diff options
author | Sylvain Munaut <s.munaut@whatever-company.com> | 2013-02-14 14:48:16 +0100 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-04-22 09:14:10 -0700 |
commit | 9b953aa4100eca5de2319b3c17c54bc2f6b03064 (patch) | |
tree | c7acd9ad371385afa8f3506b9396c3a02deb5325 | |
parent | 1a8b30eff1c7336607872eb41113539ff8817a01 (diff) | |
download | ceph-9b953aa4100eca5de2319b3c17c54bc2f6b03064.tar.gz |
radosgw: Fix duplicate 'Content-Type' when using 'response-content-type'
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/rgw/rgw_rest_s3.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 7a5e941b613..add523a6e9c 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(); |