mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
rgw: send 100-continue response only if requested
This commit is contained in:
parent
da41f66fa8
commit
5a9a5e74df
@ -164,6 +164,7 @@ struct req_state {
|
||||
const char *content_type;
|
||||
bool err_exist;
|
||||
struct rgw_err err;
|
||||
bool expect_cont;
|
||||
|
||||
XMLArgs args;
|
||||
|
||||
|
@ -275,7 +275,8 @@ int main(int argc, char *argv[])
|
||||
abort_early(&s, ret);
|
||||
continue;
|
||||
}
|
||||
dump_continue(&s);
|
||||
if (s.expect_cont)
|
||||
dump_continue(&s);
|
||||
|
||||
RGWOp *op = rgwhandler.get_op();
|
||||
if (op) {
|
||||
|
@ -712,6 +712,7 @@ void RGWHandler::init_state(struct req_state *s, struct fcgx_state *fcgx)
|
||||
s->acl = new RGWAccessControlPolicy;
|
||||
}
|
||||
s->canned_acl.clear();
|
||||
s->expect_cont = false;
|
||||
|
||||
provider_init_state();
|
||||
}
|
||||
|
@ -648,6 +648,9 @@ void RGWHandler_REST::provider_init_state()
|
||||
|
||||
s->copy_source = FCGX_GetParam("HTTP_X_AMZ_COPY_SOURCE", s->fcgx->envp);
|
||||
s->http_auth = FCGX_GetParam("HTTP_AUTHORIZATION", s->fcgx->envp);
|
||||
|
||||
const char *expect = FCGX_GetParam("HTTP_EXPECT", s->fcgx->envp);
|
||||
s->expect_cont = (expect && !strcasecmp(expect, "100-continue"));
|
||||
}
|
||||
|
||||
static bool is_acl_op(struct req_state *s)
|
||||
|
@ -115,6 +115,8 @@ class RGWHandler_REST : public RGWHandler {
|
||||
RGWOp *get_create_op(struct req_state *s);
|
||||
RGWOp *get_delete_op(struct req_state *s);
|
||||
|
||||
bool expect100cont;
|
||||
|
||||
protected:
|
||||
void provider_init_state();
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user