Skip to content

Commit

Permalink
For range requests, let the range be dumped before the error is honored.
Browse files Browse the repository at this point in the history
Signed-off-by: Pavan Rallabhandi <PRallabhandi@walmartlabs.com>
  • Loading branch information
root committed Jul 29, 2016
1 parent 613bc0a commit 4e376cd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/rgw/rgw_rest_swift.cc
Expand Up @@ -1205,17 +1205,20 @@ int RGWGetObj_ObjStore_SWIFT::send_response_data(bufferlist& bl,

set_req_state_err(s, (partial_content && !op_ret) ? STATUS_PARTIAL_CONTENT
: op_ret);

dump_errno(s);
if (s->err.is_err()) {
end_header(s, NULL);
return 0;
}

if (range_str) {
dump_range(s, ofs, end, s->obj_size);
}

dump_content_length(s, total_len);

if (s->err.is_err()) {
end_header(s, NULL);
return 0;
}

dump_last_modified(s, lastmod);
{
utime_t ut(lastmod);
Expand Down

0 comments on commit 4e376cd

Please sign in to comment.