httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hoyt <>
Subject [users@httpd] "Content-Length: 0" problem in GET request
Date Thu, 23 Mar 2006 23:21:56 GMT
Hi all,

I've got a problem with a "Content-Length: 0" header in GET requests. I 
discovered it because some requests from newish mobile phone browsers 
weren't working. Anyway, I captured the headers these phones were 
sending in the GET request, and narrowed it down to them having a 
"Content-Length: 0" header line.

If the request has that "Content-Length: 0" header line (these mobiles 
send it), Apache sends the wrong page---it always sends the home page of 
the site. If the request doesn't have the Content-Length line (most 
other browsers), Apache works fine---i.e., sends the correct page.

So this works (try it with "telnet 80"):

GET /he HTTP/1.0

but this doesn't (i.e., returns the site's main page instead of /he):

GET /he HTTP/1.0
Content-Length: 0

(And it's not a HTTP 1.0 vs 1.1 issue---if I add a "Host:" 
line and change the GET to "GET /he HTTP/1.1" it still has the same 
"Content-Length: 0" problem.)

It seems like an Apache or Apache config issue, because I don't think 
there's a problem including that "Content-Length: 0" header in the GET 
request ... though I could be missing something obvious.

Any pointers or info would be much appreciated. I'm using Apache 2.0.47 
under Win32 (WinXP SP2).

Thanks heaps,

Ben Hoyt |

Harvest Electronics | PO Box 446 | 10 Pragnell St | Masterton | New Zealand | Tel +64 6 370 1991 | Fax +64 6 370 1993

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message