On Thu, Aug 11, 2011 at 10:42 PM, Eric Wong <[email protected]> wrote:
> Joe Van Dyk <[email protected]> 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 - [email protected]
> http://rubyforge.org/mailman/listinfo/mongrel-unicorn
> Do not quote signatures (like this one) or top post when replying
>
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to