]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: Don't send error body when it's a HEAD request
authorSylvain Munaut <s.munaut@whatever-company.com>
Thu, 5 Jun 2014 09:28:27 +0000 (11:28 +0200)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 11 Aug 2014 19:36:05 +0000 (12:36 -0700)
commit0a2b4c25541bbd15776d3d35986518e37166910f
treea25a9e91533780b135d89e61966bb8fa124423f1
parent616cb927cdcaf46251480b1b71d85abc5aee2286
rgw: Don't send error body when it's a HEAD request

The main 'operation' know not to send any body for HEAD requests.

However for errors, this was not the case, the formatter would be
flushed and would send the error 'message' in the body in all cases.

For the FastCGI case it doesn't seem to be an issue, it's possible
that the webserver (apache/lighttpd/...) cleans up the response
into shape.

But when using the new civetweb frontend this cause invalid HTTP.

Backport: firefly
Fixes #8539

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
src/rgw/rgw_rest.cc