Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 92527 invoked from network); 9 Oct 2007 15:22:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 15:22:23 -0000 Received: (qmail 18678 invoked by uid 500); 9 Oct 2007 15:10:49 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 18620 invoked by uid 500); 9 Oct 2007 15:10:49 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 18607 invoked by uid 99); 9 Oct 2007 15:10:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 08:10:48 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.97.105.148] (HELO sonic.ocslab.com) (83.97.105.148) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 15:10:51 +0000 Received: from midenkov.ocslab.com (unknown [192.168.1.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sonic.ocslab.com (Postfix) with ESMTP id 3C282502FE for ; Tue, 9 Oct 2007 19:10:29 +0400 (MSD) From: Aleksey Midenkov To: dev@httpd.apache.org Subject: Re: AP_CONN_CLOSE on force-response-1.0 Date: Tue, 9 Oct 2007 19:04:22 +0400 User-Agent: KMail/1.9.7 References: <200710091654.21371.asm@uezku.kemsu.ru> <20071009151300.133c629b@grimnir> In-Reply-To: <20071009151300.133c629b@grimnir> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710091904.22052.asm@uezku.kemsu.ru> X-Virus-Checked: Checked by ClamAV on apache.org On Tuesday 09 October 2007 18:13:00 Nick Kew wrote: > On Tue, 9 Oct 2007 16:54:21 +0400 > > Aleksey Midenkov wrote: > > I believe the line making the connection always 'AP_CONN_CLOSE' on > > force-response-1.0 is a erroneous leftover. The 1.0 should keep the > > connection alive if the browser will ask it to do so. > > > > > httpd-trunk/modules/http$ grep -n -C 3 force-response-1.0 > > > http_filters.c ... > > > 700: /* kludge around broken browsers when indicated by > > > force-response-1.0 701- */ > > > 702- if (r->proto_num == HTTP_VERSION(1,0) > > > 703: && apr_table_get(r->subprocess_env, > > > "force-response-1.0")) { 704- *protocol = "HTTP/1.0"; > > > 705- r->connection->keepalive = AP_CONN_CLOSE; > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > > 706- } > > > ... > > Have you verified what happens if you remove that line? > Does it then respect exactly what the client asked for > if there's a Connection: header in the request? > And what does it then do if there isn't one? Yes, I have checked all 6 variants. In case 'Connection:' header is in the request, the response is sent exactly how this header asks (for both 1.0 and 1.1 protocols). In case of absence of 'Connection:' header, the response for 1.0 answers with 'Connection: close' and closes the connection. The response for 1.1 does not have 'Connection:' header, but keeps the connection open. The logic is provided by ap_set_keepalive, it is called right after basic_http_header_check in ap_http_header_filter. I believe the absence of the header in the last variant does regard RFC2616 (as 19.6.2 states).