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 DFBC8D35E for ; Wed, 22 May 2013 13:57:32 +0000 (UTC) Received: (qmail 9931 invoked by uid 500); 22 May 2013 13:57:32 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 9821 invoked by uid 500); 22 May 2013 13:57:32 -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 9796 invoked by uid 99); 22 May 2013 13:57:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 13:57:31 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.232.224.74] (HELO mailout05.vodafone.com) (195.232.224.74) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 13:57:23 +0000 Received: from mailint05.vodafone.com (localhost [127.0.0.1]) by mailout05.vodafone.com (Postfix) with ESMTP id 59AD62152D for ; Wed, 22 May 2013 15:57:02 +0200 (CEST) Received: from VOEXC05W.internal.vodafone.com (voexc05w.dc-ratingen.de [145.230.101.25]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mailint05.vodafone.com (Postfix) with ESMTPS id 49C4220122 for ; Wed, 22 May 2013 15:57:02 +0200 (CEST) Received: from VOEXC08W.internal.vodafone.com (145.230.101.28) by VOEXC05W.internal.vodafone.com (145.230.101.25) with Microsoft SMTP Server (TLS) id 14.2.328.11; Wed, 22 May 2013 15:57:02 +0200 Received: from VOEXM10W.internal.vodafone.com ([169.254.2.134]) by voexc08w.internal.vodafone.com ([145.230.101.28]) with mapi id 14.02.0328.011; Wed, 22 May 2013 15:57:01 +0200 From: =?iso-8859-1?Q?Pl=FCm=2C_R=FCdiger=2C_Vodafone_Group?= To: "dev@httpd.apache.org" Subject: RE: svn commit: r1484852 - in /httpd/httpd/trunk: CHANGES modules/http/http_filters.c Thread-Topic: svn commit: r1484852 - in /httpd/httpd/trunk: CHANGES modules/http/http_filters.c Thread-Index: AQHOVtxscJAGm8grBE6LSXuPVhOVPZkROeFA Date: Wed, 22 May 2013 13:57:01 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I guess you missed a special case: If the reverse proxy backend sends a response without a Content-Length head= er and without a Transfer-Encoding, which is IMHO valid for HTTP 1.0 responses if the connection is closed afte= r the response. The following patch would fix this: Index: modules/http/http_filters.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/http/http_filters.c (revision 1485192) +++ modules/http/http_filters.c (working copy) @@ -394,8 +394,15 @@ case BODY_LENGTH: case BODY_CHUNK_DATA: { - /* Ensure that the caller can not go over our boundary point. = */ - if (ctx->remaining < readbytes) { + /* + * Ensure that the caller can not go over our boundary point, + * BUT only if this is not a response by reverse proxy backend + * that sent no Content-Length header and has no transfer enco= ding + * which is valid for a non keep-alive HTTP 1.0 response. + */ + if ((ctx->remaining < readbytes) && !((ctx->remaining =3D=3D 0= ) && + (ctx->state =3D=3D BODY_NONE) && + (f->r->proxyreq =3D=3D PROXYREQ_RESPONSE))) { readbytes =3D ctx->remaining; } if (readbytes > 0) { Should I commit it? Regards R=FCdiger