head requests and chunked transfer encoding

Spil Games lists at ruby-forum.com
Wed Oct 1 13:05:19 MSD 2008


I ran into some problems with Curl doing HEAD requests on an Nginx

$ curl -I 'http://www.mydomain.com/test.php'
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 01 Oct 2008 09:01:16 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive

curl: (18) transfer closed with outstanding read data remaining

I think the problem occurs under the following circumstances:

- 'Content-Length' header not set (by PHP)
- 'Transfer-Encoding: chunked' header set (by Nginx)

And I believe Nginx may be at fault because I believe it should send at
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?
Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list