Rasmus Lerdorf wrote:
Replying to a 1.0 request with a 1.1 response is perfectly fine.
It is the default for a fresh Apache install on a request for a
simple static file, for example.

This seems bogus to me.

Quoting from the very last line of the HTTP RFC 3.6 Transfer Codings:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6

"A server MUST NOT send transfer-codings to an HTTP/1.0 client."

Now if all the Apache requirements for chunked encoding match (apart from the request originally being a HTTP/1.0 one) then this will lead to a Transfer-Encoding: chunked being sent to the client. Which violates the RFC and breaks clients like wget, php and other simple clients not expecting a chunked response.

On top of that http://www.ietf.org/rfc/rfc2145.txt states in section 2.3 that "An HTTP server SHOULD send a response version equal to the highest version for which the server is at least conditionally compliant, and whose major version is less than or equal to the one received in the request."

It doesn't seem to be a problem with static files as it won't send a chunked response if it knows the length and hence can send a Content-Length header. Still a violation of the RFCs IMHO though.

On the other hand I see no reason to upgrade a reponse to HTTP/1.1 when HTTP/1.0 was requested.

Regards,
- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to