Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E54A60F0 for ; Sat, 14 May 2011 20:58:42 +0000 (UTC) Received: (qmail 58773 invoked by uid 500); 14 May 2011 20:58:42 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 58726 invoked by uid 500); 14 May 2011 20:58:42 -0000 Mailing-List: contact cvs-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 cvs@httpd.apache.org Received: (qmail 58719 invoked by uid 99); 14 May 2011 20:58:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 May 2011 20:58:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 May 2011 20:58:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2CF5A2388906; Sat, 14 May 2011 20:58:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1103223 - /httpd/httpd/trunk/modules/http/http_filters.c Date: Sat, 14 May 2011 20:58:21 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110514205821.2CF5A2388906@eris.apache.org> Author: sf Date: Sat May 14 20:58:20 2011 New Revision: 1103223 URL: http://svn.apache.org/viewvc?rev=1103223&view=rev Log: If chunked encoding / content-length are corrupt, we may treat parts of one request's body as the next one's headers. To be safe, we should disable keep-alive in this case. Modified: httpd/httpd/trunk/modules/http/http_filters.c Modified: httpd/httpd/trunk/modules/http/http_filters.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?rev=1103223&r1=1103222&r2=1103223&view=diff ============================================================================== --- httpd/httpd/trunk/modules/http/http_filters.c (original) +++ httpd/httpd/trunk/modules/http/http_filters.c Sat May 14 20:58:20 2011 @@ -78,6 +78,7 @@ typedef struct http_filter_ctx { apr_bucket_brigade *bb; } http_ctx_t; +/* bail out if some error in the HTTP input filter happens */ static apr_status_t bail_out_on_error(http_ctx_t *ctx, ap_filter_t *f, int http_error) @@ -93,6 +94,11 @@ static apr_status_t bail_out_on_error(ht e = apr_bucket_eos_create(f->c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, e); ctx->eos_sent = 1; + /* If chunked encoding / content-length are corrupt, we may treat parts + * of this request's body as the next one's headers. + * To be safe, disable keep-alive. + */ + f->r->connection->keepalive = AP_CONN_CLOSE; return ap_pass_brigade(f->r->output_filters, bb); }