Skip to content

Commit

Permalink
Merge pull request ceph#7869 from rzarzynski/wip-rgw-aws4-puthash
Browse files Browse the repository at this point in the history
rgw: calculate payload hash in RGWPutObj_ObjStore only when necessary.

Reviewed-by: Orit Wasserman <[email protected]>
  • Loading branch information
oritwas committed Mar 2, 2016
2 parents 2786f0b + 55eeee9 commit e09863b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/rgw/rgw_rest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1001,10 +1001,13 @@ int RGWPutObj_ObjStore::get_data(bufferlist& bl)
bufferptr bp(cl);

int read_len; /* cio->read() expects int * */
int r = STREAM_IO(s)->read(bp.c_str(), cl, &read_len, true);
len = read_len;
if (r < 0)
int r = STREAM_IO(s)->read(bp.c_str(), cl, &read_len,
s->aws4_auth_needs_complete);
if (r < 0) {
return r;
}

len = read_len;
bl.append(bp, 0, len);
}

Expand Down

0 comments on commit e09863b

Please sign in to comment.