[BUG] nginx missing response header on 400 bad request

Igor Sysoev igor at sysoev.ru
Wed Apr 27 08:10:17 MSD 2011


On Tue, Apr 26, 2011 at 11:35:35PM -0400, xiezhenye wrote:
> nginx does not sent the response headers but only response body on 400
> bad request.
> 
> e.g. 
> 
> $ nc 127.0.0.1 80
> GET  HTTP/1.0
> <html>
> <head><title>400 Bad Request</title></head>
> <body bgcolor="white">
> <center><h1>400 Bad Request</h1></center>
> <hr><center>nginx/0.9.1</center>
> </body>
> </html>

This is so called HTTP/0.9 response.
There are no headers in HTTP/0.9.

$ nc apache.org 80
GET HTTP/1.0
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.3.8 (Unix) mod_ssl/2.3.8 OpenSSL/1.0.0c Server at www.apache.org Port 80</address>
</body></html>


-- 
Igor Sysoev



More information about the nginx mailing list