15 messages in ru.sysoev.nginxRe: head requests and chunked transfe...
FromSent OnAttachments
Spil GamesOct 1, 2008 2:04 am 
Igor SysoevOct 1, 2008 2:19 am.head
Robert GabrielOct 1, 2008 3:32 am 
Igor SysoevOct 1, 2008 4:14 am.head1
Spil GamesOct 1, 2008 4:57 am 
Robert GabrielOct 1, 2008 5:01 am 
Spil GamesOct 1, 2008 5:03 am 
Grzegorz NosekOct 1, 2008 5:04 am 
Robert GabrielOct 1, 2008 5:06 am 
Robert GabrielOct 1, 2008 5:20 am 
Daniel CromptonOct 23, 2008 4:22 am 
Maxim DouninOct 23, 2008 4:48 am 
Daniel CromptonOct 23, 2008 5:00 am 
Maxim DouninOct 23, 2008 5:24 am 
Daniel CromptonOct 23, 2008 5:56 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: head requests and chunked transfer encodingActions...
From:Daniel Crompton (lis@ruby-forum.com)
Date:Oct 23, 2008 4:22:15 am
List:ru.sysoev.nginx

Igor Sysoev wrote:

On Wed, Oct 01, 2008 at 11:05:19AM +0200, Spil Games wrote:

least one empty chunk when claimed to do chunked transfer encoding.

Wouldn't it be better to not use chunked transfer encoding at all for HEAD requests?

Yes, nginx should not set the "Transfer-Encoding: chunked". The attached patch fixes this.

What about the other way round? I send the following:

POST / HTTP/1.0 User-Agent: Wget/1.11.3 Accept: */* Host: localhost Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Transfer-Encoding: chunked Content-Length: 142

<-- body here -->

And receive:

HTTP/1.1 411 Length Required Server: nginx Date: Thu, 23 Oct 2008 11:08:57 GMT Content-Type: text/html Content-Length: 146 Connection: close

<html> <head><title>411 Length Required</title></head> <body bgcolor="white"> <center><h1>411 Length Required</h1></center> </body> </html>

I think that somebody took rfc2616 section 4.4 a little to literally: <blockquote><i>3. ... If a message is received with both a Transfer-Encoding header field and a Content-Length header field, the latter MUST be ignored.</i></blockquote>

Content-Length MUST be ignored, but it doesn't mean it should bail with an error. Or am I missing something?