]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix crash when missing content-type in POST object
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 29 Jan 2013 01:13:23 +0000 (17:13 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 29 Jan 2013 01:31:10 +0000 (17:31 -0800)
Fixes: #3941
This fixes a crash when handling S3 POST request and content type
is not provided.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rest_s3.cc

index b2925940f77fc32e90ca04abfcae255ba1683988..dfa6827c7fff7ed5a8c764c1f6de576195d62b6c 100644 (file)
@@ -707,7 +707,7 @@ int RGWPostObj_ObjStore_S3::get_params()
   string whitespaces (" \t\f\v\n\r");
 
   // get the part boundary
-  string req_content_type_str = s->env->get("CONTENT_TYPE");
+  string req_content_type_str = s->env->get("CONTENT_TYPE", "");
   string req_content_type;
   map<string, string> params;