From: Jonathan Rudenberg <jonathan@titanous.com>
To: mongrel-unicorn@rubyforge.org
Subject: HEAD responses contain body
Date: Thu, 13 Jun 2013 12:09:43 -0400 [thread overview]
Message-ID: <9AEB1922-1C40-4E20-868B-9B890C22905E@titanous.com> (raw)
RFC 2616 section 9.4[1] 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 unicorn-4.6.2:
require 'rack'
run lambda { |env| [200, {}, []] }
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:8080
Accept: */*
HTTP/1.1 200 OK
Date: Thu, 13 Jun 2013 16:04:55 GMT
Status: 200 OK
Connection: close
Transfer-Encoding: chunked
0
HTTP/1.1 500 Internal Server Error
As you can see, not only is there a zero-length chunked encoding body, but for some unknown reason there is a 500 response with no body as well.
Please cc any responses directly to me, as I do not subscribe to this list.
Cheers,
Jonathan
[1] https://tools.ietf.org/html/rfc2616#section-9.4
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next reply other threads:[~2013-06-13 16:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 16:09 Jonathan Rudenberg [this message]
2013-06-13 18:22 ` HEAD responses contain body Eric Wong
2013-06-13 18:42 ` Jonathan Rudenberg
2013-06-13 19:21 ` Eric Wong
2013-06-13 19:28 ` Jonathan Rudenberg
2013-06-13 19:34 ` Jonathan Rudenberg
2013-06-13 19:45 ` Eric Wong
2013-06-13 19:54 ` Jonathan Rudenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9AEB1922-1C40-4E20-868B-9B890C22905E@titanous.com \
--to=jonathan@titanous.com \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).