radosgw refuses upload when Content-Type missing from POST policy (fwd)
Resending to ceph-devel, as I guess when radosgw behaves differently to AWS S3 it's more an interoperability question than a usage question.
Cheers,
Dave
----- Forwarded message from Dave Holland <[email protected]> -----
Date: Wed, 31 May 2017 17:02:14 +0100
From: Dave Holland <[email protected]>
To: [email protected]
Subject: radosgw refuses upload when Content-Type missing from POST policy
Message-ID: <[email protected]>
Hi,
I'm trying to get files into radosgw (Ubuntu Ceph package 10.2.3-0ubuntu0.16.04.2) using Fine Uploader
https://github.com/FineUploader/fine-uploader but I'm running into difficulties in the case where the uploaded file has a filename extension which the browser can't map to a MIME type (or, no extension at all).
The radosgw replies with a 403 error, "Policy missing condition:
Content-Type". Examining the policy which the browser sends as part of the multipart data confirms that there is no Content-Type. (The POST and multipart do have Content-Type headers.) The same code and POST works fine against AWS S3. Should radosgw require a Content-Type in the POST policy when AWS S3 doesn't? It seems that for maximum compatibility, it shouldn't.
The bucket's CORS policy is "<AllowedHeader>*</AllowedHeader>" but it doesn't work with explicitly mentioning Content-Type either.
I put a radosgw debug=20 log of the successful OPTIONS call and failing POST call here:
https://docs.google.com/document/d/1i3exJSil1xj14ZrDOF_oM9eZC238gnNVAsnaZ-Pkvzo/edit?usp=sharing
Happy to provide other debug info if necessary.
thanks,
Dave
Signature · 12 lines
** Dave Holland ** Systems Support -- Informatics Systems Group ** ** 01223 496923 ** The Sanger Institute, Hinxton, Cambridge, UK ** ----- End forwarded message ----- -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
Yeah, seems like an api incompatibility issue. Can you open a ceph tracker with the details there?
Thanks,
Yehuda
Quoted 59 lines · Dave Holland
Resending to ceph-devel, as I guess when radosgw behaves differently to AWS S3 it's more an interoperability question than a usage question.
Cheers,
Dave----- Forwarded message from Dave Holland <[email protected]> -----
Date: Wed, 31 May 2017 17:02:14 +0100
From: Dave Holland <[email protected]>
To: [email protected]
Subject: radosgw refuses upload when Content-Type missing from POST policy
Message-ID: <[email protected]>Hi,
I'm trying to get files into radosgw (Ubuntu Ceph package 10.2.3-0ubuntu0.16.04.2) using Fine Uploader
https://github.com/FineUploader/fine-uploader but I'm running into difficulties in the case where the uploaded file has a filename extension which the browser can't map to a MIME type (or, no extension at all).The radosgw replies with a 403 error, "Policy missing condition:
Content-Type". Examining the policy which the browser sends as part of the multipart data confirms that there is no Content-Type. (The POST and multipart do have Content-Type headers.) The same code and POST works fine against AWS S3. Should radosgw require a Content-Type in the POST policy when AWS S3 doesn't? It seems that for maximum compatibility, it shouldn't.The bucket's CORS policy is "<AllowedHeader>*</AllowedHeader>" but it doesn't work with explicitly mentioning Content-Type either.
I put a radosgw debug=20 log of the successful OPTIONS call and failing POST call here:
https://docs.google.com/document/d/1i3exJSil1xj14ZrDOF_oM9eZC238gnNVAsnaZ-Pkvzo/edit?usp=sharingHappy to provide other debug info if necessary.
thanks,
Dave
--
** Dave Holland ** Systems Support -- Informatics Systems Group ** ** 01223 496923 ** The Sanger Institute, Hinxton, Cambridge, UK **----- End forwarded message -----
--
The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks - I just created tracker #20201.
Cheers,
Dave
Signature · 2 lines
** Dave Holland ** Systems Support -- Informatics Systems Group ** ** 01223 496923 ** The Sanger Institute, Hinxton, Cambridge, UK **
Quoted 66 lines · Yehuda Sadeh-Weinraub
Yeah, seems like an api incompatibility issue. Can you open a ceph tracker with the details there?
Thanks,
YehudaQuoted 59 lines · Dave Holland
Resending to ceph-devel, as I guess when radosgw behaves differently to AWS S3 it's more an interoperability question than a usage question.
Cheers,
Dave----- Forwarded message from Dave Holland <[email protected]> -----
Date: Wed, 31 May 2017 17:02:14 +0100
From: Dave Holland <[email protected]>
To: [email protected]
Subject: radosgw refuses upload when Content-Type missing from POST policy
Message-ID: <[email protected]>Hi,
I'm trying to get files into radosgw (Ubuntu Ceph package 10.2.3-0ubuntu0.16.04.2) using Fine Uploader
https://github.com/FineUploader/fine-uploader but I'm running into difficulties in the case where the uploaded file has a filename extension which the browser can't map to a MIME type (or, no extension at all).The radosgw replies with a 403 error, "Policy missing condition:
Content-Type". Examining the policy which the browser sends as part of the multipart data confirms that there is no Content-Type. (The POST and multipart do have Content-Type headers.) The same code and POST works fine against AWS S3. Should radosgw require a Content-Type in the POST policy when AWS S3 doesn't? It seems that for maximum compatibility, it shouldn't.The bucket's CORS policy is "<AllowedHeader>*</AllowedHeader>" but it doesn't work with explicitly mentioning Content-Type either.
I put a radosgw debug=20 log of the successful OPTIONS call and failing POST call here:
https://docs.google.com/document/d/1i3exJSil1xj14ZrDOF_oM9eZC238gnNVAsnaZ-Pkvzo/edit?usp=sharingHappy to provide other debug info if necessary.
thanks,
Dave
--
** Dave Holland ** Systems Support -- Informatics Systems Group ** ** 01223 496923 ** The Sanger Institute, Hinxton, Cambridge, UK **----- End forwarded message -----
--
The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 4 lines
The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.