-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
204 is not okay for OPTION status code (this breaks angular2) #359
Comments
This also messes up Safari https XHR OPTIONS requests - nothing that really breaks anything but they're never closed. |
Thanks for bringing this up. I came to the same conclusion after reading the RFCs.
The CORS preflight response now looks like this:
|
This is IMO a breaking change for anyone checking if the response code is 204. |
Preflight requests are not handled in user-land, they're executed by the browser. Are you considering a different case? Could you expand on that case? |
Our angular2 app is not working, because the koa-router sends 204 responses for the OPTION xhr calls.
Then I quickly searched for correct status codes for OPTION calls and quickly found this answer:
https://stackoverflow.com/a/31256072
koa-router incorrectly dosn't provide the Content-length Header, which it should (and therefore send a 200. not a 204).
The text was updated successfully, but these errors were encountered: