Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
July 09, 2012 05:54AM
Hello!

On Mon, Jul 09, 2012 at 10:41:19AM +0200, Sjon Hortensius wrote:

> Hi,
>
> 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: wiki.nginx.org\r\n\r\n" ; } ;
> req | nc wiki.nginx.org 80
>
> I can also reproduce this for other 4xx responses. My interpretation
> of the RFC is that this is unwanted, see
> http://tools.ietf.org/html/rfc2616#section-6.1

Headers aren't sent if nginx assumes the request is in HTTP/0.9
format. The above script makes nginx to think it's HTTP/0.9 as
uri used dosn't fit into header buffer and nginx isn't able to
see "HTTP/1.1" before it returns 414.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
SubjectAuthorPosted

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

Sjon HortensiusJuly 09, 2012 04:42AM

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

Maxim DouninJuly 09, 2012 05:54AM

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

Sjon HortensiusJuly 09, 2012 07:02AM

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

Igor SysoevJuly 09, 2012 08:48AM

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

Sjon HortensiusJuly 10, 2012 06:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready