Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58798 invoked by uid 1010); 30 Apr 2007 23:41:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58783 invoked from network); 30 Apr 2007 23:41:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2007 23:41:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.6 Received: from [195.226.6.51] ([195.226.6.51:41783] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/EE-42224-CBE76364 for ; Mon, 30 Apr 2007 19:41:50 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 93BE2AC015; Tue, 1 May 2007 01:41:45 +0200 (CEST) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXp1VqHI; Tue, 1 May 2007 01:41:40 +0200 (CEST) Received: from box.local (80-219-9-20.dclient.hispeed.ch [80.219.9.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id A0812AC00D; Tue, 1 May 2007 01:41:39 +0200 (CEST) Message-ID: <46367EC3.4020505@cschneid.com> Date: Tue, 01 May 2007 01:41:55 +0200 User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: Rasmus Lerdorf CC: internals@lists.php.net References: <4636763B.3000305@lerdorf.com> In-Reply-To: <4636763B.3000305@lerdorf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] Setting HTTP results code vs. HTTP type From: cschneid@cschneid.com (Christian Schneider) 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