Skip to content
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

Patch HTTP method missing in Access-Control-Allowed-Methods header property #2

Closed
lozandier opened this issue Nov 4, 2015 · 1 comment

Comments

@lozandier
Copy link

The Problem

On line 83 of simplehttp2server.go it seems PATCH is omitted in a context that it shouldn't.

Side-effect

Unless it's simply not supported as I think it is, PATCH being omitted can unexpectedly break the Principle of Least Astonishment when partially updating representation of resources on the server with a set of operations or the resource sent back itself.

The Suggestion Action

If I'm correct, Line 83 can be changed to the following:

w.Header().Set("Access-Control-Allow-Methods", "GET, OPTION, HEAD, PUT, PATCH, POST, DELETE")
lozandier added a commit to lozandier/simplehttp2server that referenced this issue Nov 4, 2015
@surma
Copy link
Contributor

surma commented Dec 10, 2015

Sorry for the late reply. My emails got filtered the wrong way 😕

You are totally right, will fix :)

@surma surma closed this as completed in 75fda86 Dec 10, 2015
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

No branches or pull requests

2 participants