Re: How to configure Apache 2.x for HTTP 1.0 version?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
sctemme@xxxxxxxxxx
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux