When a range request is made for more than rgw_get_obj_max_req_size
bytes the first returned chunk sets 'ret' to STATUS_PARTIAL_CONTENT and
all remaining chunks behave as if there is an error state and only
return a minimal header.
Fix this by passing STATUS_PARTIAL_CONTENT to set_req_state_err, but
leave the 'ret' member variable untouched.
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
{
const char *content_type = NULL;
string content_type_str;
- int orig_ret = ret;
+ int req_state = ret;
map<string, string> response_attrs;
map<string, string>::iterator riter;
}
if (partial_content && !ret)
- ret = STATUS_PARTIAL_CONTENT;
+ req_state = STATUS_PARTIAL_CONTENT;
done:
- set_req_state_err(s, ret);
+ set_req_state_err(s, req_state);
dump_errno(s);
sent_header = true;
send_data:
- if (get_data && !orig_ret) {
+ if (get_data && !ret) {
int r = s->cio->write(bl.c_str() + bl_ofs, bl_len);
if (r < 0)
return r;