-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
code.NotFound should return a 404 instead of a 405 #630
Comments
Interesting that you get that result. This is the code where we do that conversion. Are you doing anything non-standard in your setup? I've been using this error code for years in my application without trouble, I'd be interested in running down the problem. |
Just realized what it is, it's a |
I did |
I think I had a possible misunderstanding here, but why does a HEAD request fail it. Technically HEAD should also return an |
The logic behind this is that we require you to be explicit about the request methods you intend to receive. If you want to receive a See the documentation line
Per the HttpRule documentation. |
WRT RFC2616 10.4.6, that is another in a long line of things we MUST do according to the RFC, but don't perfectly implement because no one has needed them yet. I would love to merge a PR that adds it. If compliance with that spec is the name of the game you could also implement a handler that responds to HEAD requests appropriately. |
Roger that, sorry for the confusion. Closing. |
No worries, have a good day! |
Please follow the general troubleshooting steps first:
grpc-gateway
to the latest version from github. withgit fetch https://github.com/grpc-ecosystem/grpc-gateway master && git reset --hard FETCH_HEAD
protoc-gen-grpc-gateway
andprotoc-gen-swagger
binary from yourPATH
,and install locally built binaries.
Bug reports:
Steps you follow to reproduce the error:
What did you expect to happen instead:
(https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405)
What's your theory on why it isn't working:
I'm guessing the code mapping from grpc -> http is a little off.
The text was updated successfully, but these errors were encountered: