Re: rgw gives MethodNotAllowed for OPTIONS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So I put a, nginx proxy in front of rgw since I couldn’t find any definitive answer on whether or not it allows OPTIONS. Now the browser is doing a POST, and it’s still getting a MethodNotAllowed response. This is a fresh install of luminous. Is this an rgw error or a civetweb error? I found an option to allow civetweb to accept different methods, but it doesn’t seem to be supported in 1.8 (which is the version I think luminous is using). Do I need to update this somehow?

 

POST http://storage-test01:7480/ HTTP/1.1

Host: storage-test01:7480

Connection: keep-alive

Content-Length: 1877

Pragma: no-cache

Cache-Control: no-cache

Origin: http://localhost:3032

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryG7wgmPygxDHGHx7F

Accept: */*

Referer: http://localhost:3032/Project/157/Assets

Accept-Encoding: gzip, deflate

Accept-Language: en-US,en;q=0.9,es;q=0.8

 

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="key"

 

7276e4a8-dfa5-4bc1-8289-287a0524acf6.txt

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="Content-Type"

 

text/plain

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="success_action_status"

 

200

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="x-amz-server-side-encryption"

 

AES256

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="acl"

 

private

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="x-amz-meta-qqfilename"

 

asd.txt

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="AWSAccessKeyId"

 

<my access key>

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="policy"

 

eyAgImV4cGlyYXRpb24iOiAiMjAxOC0wMi0xM1QwMjo0NToxMC4wNjJaIiwgICJjb25kaXRpb25zIjogWyAgICB7ICAgICAgImFjbCI6ICJwcml2YXRlIiAgICB9LCAgICB7ICAgICAgImJ1Y2tldCI6ICJkZmNuLXVwbG9hZHMtZGV2IiAgICB9LCAgICB7ICAgICAgIkNvbnRlbnQtVHlwZSI6ICJ0ZXh0L3BsYWluIiAgICB9LCAgICB7ICAgICAgInN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDAiICAgIH0sICAgIHsgICAgICAieC1hbXotc2VydmVyLXNpZGUtZW5jcnlwdGlvbiI6ICJBRVMyNTYiICAgIH0sICAgIHsgICAgICAia2V5IjogIjcyNzZlNGE4LWRmYTUtNGJjMS04Mjg5LTI4N2EwNTI0YWNmNi50eHQiICAgIH0sICAgIHsgICAgICAieC1hbXotbWV0YS1xcWZpbGVuYW1lIjogImFzZC50eHQiICAgIH0sICAgIFsgICAgICAiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAgICAgICIwIiwgICAgICAiMTA0ODU3NjAwIiAgICBdICBdfQ==

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="signature"

 

ERz2TI4ZwMK9d6uzQwoRJNPAnGY=

------WebKitFormBoundaryG7wgmPygxDHGHx7F

Content-Disposition: form-data; name="file"; filename="asd.txt"

Content-Type: text/plain

 

aspdjaopsdjkoijasd

asodijaosdijoaisd

 

------WebKitFormBoundaryG7wgmPygxDHGHx7F--

 

 

 

 

 

 

 

HTTP/1.1 405 Method Not Allowed

Server: nginx/1.10.3

Date: Tue, 13 Feb 2018 02:40:17 GMT

Content-Type: application/xml

Content-Length: 191

Connection: keep-alive

x-amz-request-id: tx000000000000000000004-005a825011-1489c-default

Accept-Ranges: bytes

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS

Access-Control-Allow-Headers: authorization,x-amz-content-sha256,x-amz-date,content-md5,content-type

Access-Control-Expose-Headers: ETag

 

<?xml version="1.0" encoding="UTF-8"?><Error><Code>MethodNotAllowed</Code><RequestId>tx000000000000000000004-005a825011-1489c-default</RequestId><HostId>1489c-default-default</HostId></Error>

 

 

From: ceph-users [mailto:ceph-users-bounces@xxxxxxxxxxxxxx] On Behalf Of Piers Haken
Sent: Monday, February 12, 2018 5:17 PM
To: ceph-users@xxxxxxxxxxxxxx
Subject: rgw gives MethodNotAllowed for OPTIONS?

 

I’m trying to do direct-from-browser upload to rgw using pre-signed urls, and I’m getting stuck because the browser is doing a pre-flight OPTIONS request and rgw is giving me a MethodNotAllowed response.

 

Is this supported?

 

OPTIONS http://storage-test01:7480/ HTTP/1.1

Host: storage-test01:7480

Connection: keep-alive

Origin: http://localhost:3032

Access-Control-Request-Method: POST

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Accept: */*

Accept-Encoding: gzip, deflate

Accept-Language: en-US,en;q=0.9,es;q=0.8

 

 

HTTP/1.1 405 Method Not Allowed

Content-Length: 189

x-amz-request-id: tx00000000000000000000f-005a823b66-5e3e-default

Accept-Ranges: bytes

Content-Type: application/xml

Date: Tue, 13 Feb 2018 01:12:06 GMT

Connection: Keep-Alive

 

<?xml version="1.0" encoding="UTF-8"?><Error><Code>MethodNotAllowed</Code><RequestId>tx00000000000000000000f-005a823b66-5e3e-default</RequestId><HostId>5e3e-default-default</HostId></Error>

 

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux