From f41010c44b3a4489525d25cd35084a168dc5f537 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 28 Jan 2013 17:13:23 -0800 Subject: [PATCH] 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 --- src/rgw/rgw_rest_s3.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index b2925940f77fc..dfa6827c7fff7 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; -- 2.39.5