From: Yehuda Sadeh Date: Tue, 29 Jan 2013 01:13:23 +0000 (-0800) Subject: rgw: fix crash when missing content-type in POST object X-Git-Tag: v0.57~93^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=09522e5a62e758d6d7d0c524daed1684c19fb8e3;p=ceph.git 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 --- 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 params;