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

HEAD requests can return a body #189

Merged
merged 1 commit into from
Jul 9, 2012

Conversation

stephencelis
Copy link
Contributor

Right now, Grape doesn't adhere to HTTP/1.1:

The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4

(A simple curl -X HEAD will show the body for a HEAD endpoint.)

@mbleigh
Copy link
Contributor

mbleigh commented Jun 26, 2012

I'd be happy to take a pull request :)

@stephencelis
Copy link
Contributor Author

Happy to work on one, just wanted to open #190 as well to hear your overall input :)

"The HEAD method is identical to GET except that the server MUST NOT
return a message-body in the response."

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
@stephencelis
Copy link
Contributor Author

Simple enough fix.

@dblock
Copy link
Member

dblock commented Jun 27, 2012

This looks right to me, thank you. I don't see why anyone wouldn't want this by default. Will keep open for a bit for comments before merging.

@dblock
Copy link
Member

dblock commented Jun 30, 2012

I forgot to ask you to update CHANGELOG. I'll merge this then. Thank you.

dblock added a commit that referenced this pull request Jul 9, 2012
@dblock dblock merged commit d40a849 into ruby-grape:master Jul 9, 2012
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.

3 participants