]> 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)
committerSage Weil <sage@redhat.com>
Tue, 12 Aug 2014 22:14:02 +0000 (15:14 -0700)
commitfc1a4b5fdce7b92ba1b321dec37c4c75501e3521
tree79be4eb64e1863c84af3ab5800fdbc59085c800e
parente3bc15343720d0455e32e429e7cf865037bd90d7
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>
(cherry picked from commit 0a2b4c25541bbd15776d3d35986518e37166910f)
src/rgw/rgw_rest.cc