Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 44871 invoked from network); 22 Jul 2004 10:52:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Jul 2004 10:52:59 -0000 Received: (qmail 97355 invoked by uid 500); 22 Jul 2004 10:52:53 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 97254 invoked by uid 500); 22 Jul 2004 10:52:53 -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: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 97241 invoked by uid 99); 22 Jul 2004 10:52:52 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [80.229.52.226] (HELO hugin.webthing.com) (80.229.52.226) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 22 Jul 2004 03:52:49 -0700 Received: by hugin.webthing.com (Postfix, from userid 500) id AF39B4127D; Thu, 22 Jul 2004 11:52:42 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by hugin.webthing.com (Postfix) with ESMTP id A4A6C4013A for ; Thu, 22 Jul 2004 11:52:42 +0100 (BST) Date: Thu, 22 Jul 2004 11:52:42 +0100 (BST) From: Nick Kew To: dev@httpd.apache.org Subject: Re: cvs commit: httpd-2.0/modules/filters mod_deflate.c In-Reply-To: <20040719154152.GD22422@redhat.com> Message-ID: References: <20040717152235.62897.qmail@minotaur.apache.org> <20040719110655.GA22910@redhat.com> <20040719154152.GD22422@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Mon, 19 Jul 2004, Joe Orton wrote: > Nothing like that was posted to the list, at least. Patch below is > still sufficient to fix the proxy+304 case; does it work for you too? Yes, mostly (it fixes the important bug that was previously a showstopper). And it's an improvement on my hack by virtue of simplicity. But it should still set the Content-Encoding header on a HEAD request that would normally be deflated (and unset content-length if present). So your: + /* Deflating a zero-length response would make it longer; the + * proxy may pass through an empty response for a 304 too. */ + if (APR_BUCKET_IS_EOS(APR_BRIGADE_FIRST(bb))) { + ap_remove_output_filter(f); + return ap_pass_brigade(f->next, bb); + } + should move after the the if ( ! force-gzip ) block, and if then if we reach the EOS-only test we should fix up the headers. That test also seems to lose the pathological case of a brigade with no data but one or more FLUSH buckets followed by EOS. Could that ever happen in a HEAD or a 204/304? Investigating this has revealed a similar bug with HEAD requests in inflate_out_filter, which I shall now have to fix:-( -- Nick Kew