Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

JS and page refers to non-existing "OPTION" method #4

Closed
algal opened this Issue · 4 comments

2 participants

@algal

Hi,

The CORS spec requires preflight requests that use the HTTP method OPTIONS.

This page, and the JS generated by it, attempts to use the HTTP method OPTION. But there is no such HTTP method and this is not a correct CORS preflight request.

@monsur
Owner

Can you provide a link to test-cors.org that demonstrates this issue? You can make HTTP OPTIONS requests when doing CORS; a preflight is identified when the HTTP method is OPTIONS and the Access-Control-Request-Method header are present.

@algal

When I go to http://client.cors-api.appspot.com/client I see OPTION not OPTIONS, and when I look at the JS code it shows in the code pane I see a line that says "var method = 'OPTION';" not "var method = 'OPTIONS';"

It seems like the web app is missing the "S" everywhere, which will cause it to generate preflight requests that are not recognized as preflight requests.

For instance, try setting the header to "Access-Control-Request-Method:GET" and the URL to "https://cors-test.appspot.com/test". This will work with OPTIONS, but not with OPTION.

@algal

This is a very handy web app, by the way. Sorry to be a bit terse.

@monsur monsur closed this in 312413e
@monsur
Owner

Thanks for the report! This is fixed on the live site now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.