Apache returns 400 instead of 200 at DocumentRoot

400apache-2.2http-status-codelogging

I am seeing a lot of these odd entries in my Apache access log:

SOME IP ADDRESS - - [23/Feb/2012:03:06:38 -0800] "GET /" 400 460 "-" "-"

If I try to access the Apache document root, I get:

MY IP ADDRESS - - [24/Feb/2012:09:37:28 -0800] "GET / HTTP/1.1" 200 5464 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13"

How was the other IP able to produce a 400 instead of 200?

Best Answer

It didn't send an HTTP version string (HTTP/1.1 or HTTP/1.0), that client is not speaking correct HTTP.

It should most certainly get a 400 Bad Request response. See RFC 2616:

The request could not be understood by the server due to malformed syntax.