]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw: Fix duplicate 'Content-Type' when using 'response-content-type'
authorSylvain Munaut <s.munaut@whatever-company.com>
Thu, 14 Feb 2013 13:48:16 +0000 (14:48 +0100)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 22 Apr 2013 16:14:10 +0000 (09:14 -0700)
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rest_s3.cc

index 7a5e941b613ba76f08f9d3787e62f92ef9b9eead..add523a6e9ca85de05400ba81c2aa69e262265ce 100644 (file)
@@ -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();