Re: [EMAIL PROTECTED] How to configure Apache 2.x for HTTP 1.0 version?

2008-07-15 Thread William A. Rowe, Jr.

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 
http://www.faqs.org/rfcs/rfc2616.html 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 :)

Bill

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] How to configure Apache 2.x for HTTP 1.0 version?

2008-07-15 Thread Nick Kew
On Tue, 15 Jul 2008 11:22:44 +0530
"Anand Kulkarni" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I want HTTP 1.0 protocol because I heard that passing content length
> in HTTP 1.0 request is not mandatory.

That reason to want HTTP/1.0 is just plain wrong.
Why not read the RFC instead of posting and reposting crap here?

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] How to configure Apache 2.x for HTTP 1.0 version?

2008-07-14 Thread Sander Temme


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 http://www.faqs.org/rfcs/rfc2616.html 
 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.


According to section 4.4 of the RFC, you have several options to  
indicate the length of your resource.  You could just send it and  
close the connection (option 5), which would do the trick but won't  
allow the client to calculate how long it has left to go.


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.


In any case, it doesn't necessarily matter what you *heard*.  The RFC  
is the definitive source of information, stop hearing and start reading.


S.

--
Sander Temme
[EMAIL PROTECTED]
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF





smime.p7s
Description: S/MIME cryptographic signature


RE: [EMAIL PROTECTED] How to configure Apache 2.x for HTTP 1.0 version?

2008-07-14 Thread Anand Kulkarni
Hi,

I want HTTP 1.0 protocol because I heard that passing content length in
HTTP 1.0 request is not mandatory.

In my application, the client does not know the length of data to be
sent to server through Apache as proxy. When I switched to HTTP 1.0
still its forcing content length in the request.

Do you know how to send dynamic data from client without specifying
content length?

Anand


-Original Message-
From: Sander Temme [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2008 11:01 AM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] How to configure Apache 2.x for HTTP 1.0
version?



On Jul 14, 2008, at 9:05 PM, Anand Kulkarni wrote:

> I am working on Apache 2.x. The default protcol followed is HTTP
> 1.1. But HTTP 1.1 is a persistent protocol and hence I want Apache 
> to follow HTTP 1.0 protocol.

What do you mean by 'persistent'?

> So, How to configure Apache 2.x for HTTP 1.0 version?


Keepalives off

work for you?  That gets you rid of the Keepalive feature without 
doing away with the rest of the protocol features.

S.

--
Sander Temme
[EMAIL PROTECTED]
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF







Re: [EMAIL PROTECTED] How to configure Apache 2.x for HTTP 1.0 version?

2008-07-14 Thread Sander Temme


On Jul 14, 2008, at 9:05 PM, Anand Kulkarni wrote:

I am working on Apache 2.x. The default protcol followed is HTTP  
1.1. But HTTP 1.1 is a persistent protocol and hence I want Apache  
to follow HTTP 1.0 protocol.


What do you mean by 'persistent'?


So, How to configure Apache 2.x for HTTP 1.0 version?



Keepalives off

work for you?  That gets you rid of the Keepalive feature without  
doing away with the rest of the protocol features.


S.

--
Sander Temme
[EMAIL PROTECTED]
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF





smime.p7s
Description: S/MIME cryptographic signature