diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-01-28 17:13:23 -0800 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-01-28 17:31:10 -0800 |
commit | f41010c44b3a4489525d25cd35084a168dc5f537 (patch) | |
tree | 26d70e830f18c1620b186a42404e0c135f10ba78 | |
parent | a972fd4086dea05b2e7943a20bc8c8d58afbf93c (diff) | |
download | ceph-f41010c44b3a4489525d25cd35084a168dc5f537.tar.gz |
rgw: fix crash when missing content-type in POST object
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>
-rw-r--r-- | src/rgw/rgw_rest_s3.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index b2925940f77..dfa6827c7ff 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -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; |