From 9b953aa4100eca5de2319b3c17c54bc2f6b03064 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Thu, 14 Feb 2013 14:48:16 +0100 Subject: [PATCH] radosgw: Fix duplicate 'Content-Type' when using 'response-content-type' Signed-off-by: Sylvain Munaut Reviewed-by: Yehuda Sadeh --- src/rgw/rgw_rest_s3.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 7a5e941b613ba..add523a6e9ca8 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -117,8 +117,9 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs, off_ if (response_attrs.count(aiter->second) > 0) // was already overridden by a response param continue; - if ((!content_type) && aiter->first.compare(RGW_ATTR_CONTENT_TYPE) == 0) { // special handling for content_type - content_type = iter->second.c_str(); + if (aiter->first.compare(RGW_ATTR_CONTENT_TYPE) == 0) { // special handling for content_type + if (!content_type) + content_type = iter->second.c_str(); continue; } response_attrs[aiter->second] = iter->second.c_str(); -- 2.39.5