Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer
    
Thanks for the helpful info! –  elle Feb 24 '12 at 18:19
1  
Note that while it is technically not standards-compliant Apache (2.2.x) will apparently answer a naked GET / request. In my brief testing the reply doesn't include any HTTP headers though (If you can't be bothered to send a well-formed HTTP request the server can't be bothered to send a properly-formatted response either). –  voretaq7 Feb 24 '12 at 19:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.