nginx/1.3.2 - 4xx responses are returned without HTTP headers, bug?

Sjon Hortensius sjon at
Mon Jul 9 08:41:19 UTC 2012


I think I stumbled upon a bug in nginx but I would like to get someone 
else's opinion on this.

It seems all 4xx errors are not prefixed by headers in HTTP responses. I 
have a simple test-script in bash which you can run to verify this behavior:

function req { echo -n "GET /bugtest?id="; for i in `seq 15000 17100` ; 
do echo -n "%7C$i" ; done ; echo -en "HTTP/1.1\nUser-Agent: 
Mozilla/5.0\nConnection: Close\nHost:\r\n\r\n" ; } ; req 
| nc 80

I can also reproduce this for other 4xx responses. My interpretation of 
the RFC is that this is unwanted, see

If this is not the appropriate place to report this please let me know 
as I couldn't find a better place to report this.



Sjon Hortensius

| React B.V.
| Julianastraat 30
| 2012 ES, Haarlem
| 023  553 90 00

More information about the nginx mailing list