I am trying to understand why the web server behaves differently for the following bad requests:
Method Proto Status Req Body Res Referrer User Agent HTTPS Encrytion
GET / HTTP/1.0 400 11 362 0 - - - -
\x80w\x01\x03\x01 400 29 226 0 - -
GET /api/ HTTP/1.0 400 32 226 392 - -
GET / HTTP/1.1 400 316 226 4295 - -
GET / HTTP/1.0 400 735 226 4121 - - TLSv1.2 RC4-SHA
GET http://example.com/?PHPSESSID=1abcdef0123456ABCD_EFGHI HTTP/1.1 400 167 226 392 - -
GET /HNAP1/ HTTP/1.1 400 369 226 392 http://1.2.3.4/ Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.1234)
GET http://example.net/headers HTTP/1.1 400 423 226 392 - Mozilla/5.0 (X11; Ubuntu; Linux i686 on x86_64; rv:20.0) Gecko/20100101 Firefox/20.0
I do not understand why the server is returning 0 byte for first and second request and why it is returning more than 4kB in the the 4th and 5th request when the normal size is exactly 392 bytes.
Note that I do not have any custom error page for HTTP error code 400.