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: Fri, 12 Aug 2011 11:09:36 -0700 [thread overview]
Message-ID: <CACfv+pJZbptb=Q-yhZa-DeTPiSkU5CtvAtPq0Rv+6+OXxgGXEw@mail.gmail.com> (raw)
In-Reply-To: <20110812054252.GA30507@dcvr.yhbt.net>
On Thu, Aug 11, 2011 at 10:42 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Joe Van Dyk <joe@tanga.com> wrote:
>> Has anyone seen anything like this before? I can get it to happen all
>> the time if I issue a HEAD request, but it only happens very
>> intermittently on GET requests.
>>
>> I'm using Ruby 1.9.2p180.
>>
>> Any ideas on where to start debugging?
>
> What web framework and other middlewares are you running? Are you using Rack::Head to
> generate HEAD responses or something else?
Rails 3.0. I'm not doing anything special with HEAD requests. I
actually don't care about the HEAD requests -- you'll note that I'm
doing a GET request below. The Content-Length is 37902 (which is
should be), but apparently there's nothing in the response body?
>> 204.93.223.151, 10.195.114.81 - - [11/Aug/2011 21:03:50] "GET /
>> HTTP/1.0" 200 37902 0.5316
>> app error: Content-Length header was 37902, but should be 0
>> (Rack::Lint::LintError)
>> /mnt/data/tanga/current/bundler/ruby/1.9.1/gems/rack-1.2.3/lib/rack/lint.rb:19:in
>> `assert'
>> /mnt/data/tanga/current/bundler/ruby/1.9.1/gems/rack-1.2.3/lib/rack/lint.rb:501:in
>> `verify_content_length'
>
> Looking at the 1.2.3 rack/lint.rb code, it should've set @head_request to true
> when env["REQUEST_METHOD"] == "HEAD" (rack/lint.rb line 56).
> Do you happen to have any middlewares that might rewrite REQUEST_METHOD?
>
> I would edit rack/lint.rb and put some print statements to show the
> value of @head_request and env["REQUEST_METHOD"]
>
> --
> Eric Wong
> _______________________________________________
> 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
>
_______________________________________________
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-12 18:13 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 [this message]
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
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+pJZbptb=Q-yhZa-DeTPiSkU5CtvAtPq0Rv+6+OXxgGXEw@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).