Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57F2B18AFB for ; Wed, 29 Apr 2015 12:46:56 +0000 (UTC) Received: (qmail 89673 invoked by uid 500); 29 Apr 2015 12:46:55 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 89595 invoked by uid 500); 29 Apr 2015 12:46:55 -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 89585 invoked by uid 99); 29 Apr 2015 12:46:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2015 12:46:55 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for dev@httpd.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2015 12:46:49 +0000 Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id D553D2497F for ; Wed, 29 Apr 2015 12:46:28 +0000 (UTC) Received: by wgyo15 with SMTP id o15so26911161wgy.2 for ; Wed, 29 Apr 2015 05:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nymS3X9BiUFeikrufJ3eNvvK4G8ZCtDIm+puGygGnVA=; b=pCC+zePHvmcdoUhJlKPoQ0JH/PnjY8Yt8+w2ey4boizq9jCWVbLxyx2LAdUbvXaEZP n60fQ/7EamOFEJsOY9j+5eBtBENJxx6MkTEnmddv3LZ9/n5CLv4rNXeLtTFhXUYnQW37 XvvR3Yn+d7zKAMvxhWPWzOtwUlejzqETQpy0TUnMenB70ya1lr8W1JTBoGMvyhOhOHR4 Q5/pbGxKj1cFsYMu9kAtfrUYxhi7ijxLSk6+pk3UnMIpWMG29n07WRQedsIc7tWSZMe0 8OKHJz+rvMwcoySgJTReal1ZA0drfTNFpHVaUMlb495R1dI3dQHcRxRTFhpmnmWilC7O HcIQ== MIME-Version: 1.0 X-Received: by 10.194.171.1 with SMTP id aq1mr42609182wjc.38.1430311587690; Wed, 29 Apr 2015 05:46:27 -0700 (PDT) Received: by 10.27.26.200 with HTTP; Wed, 29 Apr 2015 05:46:27 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Apr 2015 08:46:27 -0400 Message-ID: Subject: Re: HEAD response's Content-Length stripped when zero From: Eric Covener To: Apache HTTP Server Development List Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic wrote: > Hence how about removing this whole block (is there any module today > "outsmarting" httpd that cannot be considered as buggy?) or least > disable it for forwarded responses, eg: > > Index: modules/http/http_filters.c > =================================================================== > --- modules/http/http_filters.c (revision 1676716) > +++ modules/http/http_filters.c (working copy) > @@ -1292,6 +1292,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_heade > * The default (unset) behavior is to squelch the C-L in this case. > */ > if (r->header_only > + && !r->proxyreq > && (clheader = apr_table_get(r->headers_out, "Content-Length")) > && !strcmp(clheader, "0") > && conf->http_cl_head_zero != AP_HTTP_CL_HEAD_ZERO_ENABLE) { Maybe we could remember here if the CL was set by ap_content_length_filter or someone else? -- Eric Covener covener@gmail.com