]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add RGW_PRINT_CONTINUE to control wether we print the 100-continue header
authorWido den Hollander <wido@widodh.nl>
Mon, 27 Sep 2010 19:21:25 +0000 (21:21 +0200)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 15 Oct 2010 17:41:46 +0000 (10:41 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/rgw/rgw_rest.cc

index 39dc63d27edf2130dcdc5733587cc18cff44847a..44b6a4b637a3a5e515f8a38650c18666cb2af3ff 100644 (file)
@@ -649,8 +649,11 @@ 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"));
+  const char *cgi_env_continue = FCGX_GetParam("RGW_PRINT_CONTINUE", s->fcgx->envp);
+  if (cgi_env_continue != NULL && strcasecmp(cgi_env_continue, "On") == 0) {
+    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)