Can't accept more than one connection header

Eden Li eden at mojiti.com
Fri Sep 7 11:33:10 MSD 2007


I'm setting nginx up behind a proxy which sends two Connection
headers, one for transfer encoding and one for keep-alive. So:

       Connection: TE
       Connection: keep-alive

causes nginx to return a 400 error.  Is there any way to fix nginx to
obey both headers rather than rejecting the request?

$ curl -H 'Connection: keep-alive' -H 'Connection: TE' -v http://yyy/
* About to connect() to 10.16.1.19 port 80 (#0)
*   Trying 111.111.111.111... connected
* Connected to 111.111.111.111 (111.111.111.111) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.16.2 (i386-apple-darwin8.10.1) libcurl/7.16.2 zlib/1.2.3
> Accept: */*
> Connection: keep-alive
> Connection: TE
> Host: yyy
>
< HTTP/1.1 400 Bad Request
< Server: nginx/0.5.31
< Date: Fri, 07 Sep 2007 09:25:03 GMT
< Content-Type: text/html
< Content-Length: 173
< Connection: close





More information about the nginx mailing list