httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: [users@httpd] How to configure Apache 2.x for HTTP 1.0 version?
Date Tue, 15 Jul 2008 15:06:46 GMT
Sander Temme wrote:
> On Jul 14, 2008, at 10:52 PM, Anand Kulkarni wrote:
>> I want HTTP 1.0 protocol because I heard that passing content length 
>> in HTTP 1.0 request is not mandatory.
> It's not mandatory in 1.1 either.  See 
> and scroll down to section 14.13.  
> You'll see that Content-Length doesn't merit more than SHOULD, which is 
> short of MUST and means you don't strictly spoken have to send it.
> Further in section 4.4 it says that clients MUST send a Content-Length 
> header with *requests* that contain a request body, and the server can 
> respond with a 400 or 411 if the client doesn't comply.  But that's the 
> *request*, not the response your application sends.

For that matter, Transfer-Encoding: chunked is the very best of both worlds,
and all HTTP/1.1 servers must accept it for requests.  You send chunks of
data from your dynamic app as they are ready, and wrap them with a numeric
designation of how much each chunk contains. Terminate with a 0 sized chunk.

So, you don't need to know the final size, can send-when-ready as each part
is composed, and STILL use keep-alives to send another request when needed.

If you wrote a simple CGI, you'll notice that this is *exactly* what httpd
mod_cgi does for clients who accept chunked encoding :)


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