Skip to content

Conversation

dmitshur
Copy link
Member

According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6:

The response MUST include an Allow header containing a list of valid methods for the requested resource.

Fix that by setting Allow header appropriately when returning Method Not Allowed status code.

Use Method Not Allowed status code for /share endpoint. I don't recall why we went with Forbidden for /share unlike for /p/. Method Not Allowed seems more appropriate and consistent, so use it instead.

According to
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6:

> The response MUST include an Allow header containing a list of valid
> methods for the requested resource.

Fix that by setting Allow header appropriately when returning
Method Not Allowed status code.

Use Method Not Allowed status code for /share endpoint. I don't recall
why we went with Forbidden for /share unlike for /p/. Method Not Allowed
seems more appropriate and consistent, so use it instead.
@dmitshur dmitshur force-pushed the improve-MethodNotAllowed-use branch from ffd6763 to 4935012 Compare August 15, 2015 07:50
@dominikh
Copy link
Member

@shurcooL is making me say "LGTM".

@dmitshur dmitshur merged commit 4935012 into master Aug 15, 2015
@dmitshur dmitshur deleted the improve-MethodNotAllowed-use branch August 15, 2015 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants