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 responses include body #278

Closed
titanous opened this issue Jun 13, 2013 · 1 comment
Closed

HEAD responses include body #278

titanous opened this issue Jun 13, 2013 · 1 comment

Comments

@titanous
Copy link

RFC 2616 section 9.4 states:

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

A HEAD request against this simple Rack app running on puma version 2.0.1:

require 'rack'

run lambda { |env| [200, {}, ['test']] }

looks like this on the wire:

HEAD / HTTP/1.1
User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
Host: localhost:9292
Accept: */*

HTTP/1.1 200 OK
Transfer-Encoding: chunked

4
test
0

Even stranger, the body [''] looks like this:

HTTP/1.1 200 OK
Transfer-Encoding: chunked

0

0

And []:

HTTP/1.1 200 OK
Transfer-Encoding: chunked

0

@titanous
Copy link
Author

Related: rack/rack#574.

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

1 participant