Project

General

Profile

Actions

Bug #20201

closed

radosgw refuses upload when Content-Type missing from POST policy

Added by Dave Holland almost 7 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When doing an S3 upload, if Content-Type is missing from the policy part of the upload, then radosgw refuses the upload with a 403 error, "Policy missing condition: Content-Type". The same upload to AWS S3 is successful, despite the Content-Type not being present in the uploaded policy. radosgw should accept this, for better interoperability.

Context: this was encountered when using Fine Uploader https://github.com/FineUploader/fine-uploader to get files into an S3 bucket. When a user tries to upload a file which the browser can't identify (because it has an unrecognised or missing filename extension) then the Content-Type is not added to the POST'ed policy.

This is a show-stopper for uploading files which the browser isn't able to identify.

Attachments:

options-and-failing-post-20170531.txt is a radosgw debug = 20 log, showing the OPTIONS pre-flight call succeeding, and the POST failing at "env var missing in policy: Content-Type"

s3-upload-policy-missing-content-type-20170531.txt is cut-and-paste from the browser dev tools, showing the request headers and payload.

This is using Chrome 58.0.3029.110 on Linux; Ceph is 10.2.3-0ubuntu0.16.04.2 (Ubuntu packaged).


Files


Related issues 2 (0 open2 closed)

Copied to rgw - Backport #22591: luminous: radosgw refuses upload when Content-Type missing from POST policyResolvedNathan CutlerActions
Copied to rgw - Backport #22592: jewel: radosgw refuses upload when Content-Type missing from POST policyResolvedMatt BenjaminActions
Actions

Also available in: Atom PDF