Merge pull request #18658 from linuxbox2/wip-s3-post-20201

RGW: update S3 POST policy handling of Content-Type

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
Yuri Weinstein 2017-11-06 13:06:42 -08:00 committed by GitHub
commit a2f9dbc9ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1609,7 +1609,11 @@ int RGWPostObj_ObjStore_S3::get_params()
env.add_var("key", s->object.name);
part_str(parts, "Content-Type", &content_type);
env.add_var("Content-Type", content_type);
/* AWS permits POST without Content-Type: http://tracker.ceph.com/issues/20201 */
if (! content_type.empty()) {
env.add_var("Content-Type", content_type);
}
map<string, struct post_form_part, ltstr_nocase>::iterator piter =
parts.upper_bound(RGW_AMZ_META_PREFIX);