@@ -1141,7 +1141,7 @@ bool AWSv4ComplMulti::is_signature_mismatched()
11411141 }
11421142}
11431143
1144- size_t AWSv4ComplMulti::recv_body (char * const buf, const size_t buf_max)
1144+ size_t AWSv4ComplMulti::recv_chunk (char * const buf, const size_t buf_max, bool & eof )
11451145{
11461146 /* Buffer stores only parsed stream. Raw values reflect the stream
11471147 * we're getting from a client. */
@@ -1166,6 +1166,7 @@ size_t AWSv4ComplMulti::recv_body(char* const buf, const size_t buf_max)
11661166 to_extract);
11671167 parsing_buf.resize (parsing_buf.size () - (to_extract - received));
11681168 if (received == 0 ) {
1169+ eof = true ;
11691170 break ;
11701171 }
11711172
@@ -1215,6 +1216,7 @@ size_t AWSv4ComplMulti::recv_body(char* const buf, const size_t buf_max)
12151216 dout (30 ) << " AWSv4ComplMulti: to_extract=" << to_extract << " , received=" << received << dendl;
12161217
12171218 if (received == 0 ) {
1219+ eof = true ;
12181220 break ;
12191221 }
12201222
@@ -1229,6 +1231,19 @@ size_t AWSv4ComplMulti::recv_body(char* const buf, const size_t buf_max)
12291231 return buf_pos;
12301232}
12311233
1234+ size_t AWSv4ComplMulti::recv_body (char * const buf, const size_t buf_max)
1235+ {
1236+ bool eof = false ;
1237+ size_t total = 0 ;
1238+
1239+ while (total < buf_max && !eof) {
1240+ const size_t received = recv_chunk (buf + total, buf_max - total, eof);
1241+ total += received;
1242+ }
1243+ dout (20 ) << " AWSv4ComplMulti: received=" << total << dendl;
1244+ return total;
1245+ }
1246+
12321247void AWSv4ComplMulti::modify_request_state (const DoutPrefixProvider* dpp, req_state* const s_rw)
12331248{
12341249 const char * const decoded_length = \
0 commit comments