From: Joe Van Dyk <joe@tanga.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Rack content-length Rack::Lint::LintErrors errors with unicorn
Date: Tue, 23 Aug 2011 11:22:01 -0700 [thread overview]
Message-ID: <CACfv+p+RJjgxFa7bY9YfLR6xSRjKVdbw+nUTv=cQgVRp0xuNrA@mail.gmail.com> (raw)
In-Reply-To: <20110822203846.GA16913@dcvr.yhbt.net>
On Mon, Aug 22, 2011 at 1:38 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Joe Van Dyk <joe@tanga.com> wrote:
>> Narrowed this down a little bit more.
>>
>> Nginx is receiving a HEAD request, unicorn is logging a GET.
>> Somewhere along the chain, the http method is getting mangled.
>
> That's not good. I'm pretty sure all versions of nginx send HEAD
> requests as-is to Unicorn, so something in your Rack middleware stack is
> rewriting HEAD => GET.
>
> You can strace a Unicorn worker to confirm it receives a HEAD and not a
> GET at the socket level. Do it on a server that's not receiving any
> other traffic and use one worker process so you're always stracing the
> correct worker process.
I started a new Rails application at
https://github.com/joevandyk/unicorn-head-requests
When I send unicorn a HEAD request, it logs it as a GET. This shows
up in the unicorn log:
127.0.0.1 - - [23/Aug/2011 11:15:38] "GET / HTTP/1.1" 200 - 0.0231
But this is what shows up in Rails:
Started HEAD "/" for 127.0.0.1 at 2011-08-23 11:15:58 -0700
Processing by WelcomeController#index as
_______________________________________________
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 prev parent reply other threads:[~2011-08-23 18:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 4:39 Rack content-length Rack::Lint::LintErrors errors with unicorn Joe Van Dyk
2011-08-12 5:42 ` Eric Wong
2011-08-12 18:09 ` Joe Van Dyk
2011-08-12 19:22 ` Joe Van Dyk
2011-08-12 22:36 ` Eric Wong
2011-08-13 4:09 ` Joe Van Dyk
2011-08-13 4:51 ` Eric Wong
2011-08-13 7:24 ` Joe Van Dyk
2011-08-13 8:29 ` Eric Wong
2011-08-13 7:29 ` Joe Van Dyk
2011-08-13 8:17 ` Eric Wong
2011-08-22 20:13 ` Joe Van Dyk
2011-08-22 20:38 ` Eric Wong
2011-08-23 18:22 ` Joe Van Dyk [this message]
2011-08-23 18:29 ` Joe Van Dyk
2011-08-23 19:54 ` Joe Van Dyk
2011-08-23 20:00 ` Eric Wong
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='CACfv+p+RJjgxFa7bY9YfLR6xSRjKVdbw+nUTv=cQgVRp0xuNrA@mail.gmail.com' \
--to=joe@tanga.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).