]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Avoid sending a success response when an error occurs. 93/head
authorJan Harkes <jaharkes@cs.cmu.edu>
Fri, 8 Mar 2013 03:10:42 +0000 (22:10 -0500)
committerJan Harkes <jaharkes@cs.cmu.edu>
Fri, 8 Mar 2013 03:29:39 +0000 (22:29 -0500)
commit08d5a283df1c5723e0ac0492609037bb9c85e11b
tree72499c4dcc32bfe2f384dca4a3e5e5a44f1e5c78
parent439d0e334d7d0246806e5b7c6702b8198f9bed71
Avoid sending a success response when an error occurs.

Functions called from RGWGetObj_ObjStore_S3::send_response_data may
change the value of the non-local variable 'ret'. But the response
relies on a local 'req_state' which copies ret at the start of the
function.

Right now none of the called functions actually changes ret so the
problem doesn't trigger, but to avoid future breakage it is safer
to not rely on the (early) copy of the ret variable.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
src/rgw/rgw_rest_s3.cc