From cvs-return-35462-apmail-httpd-cvs-archive=httpd.apache.org@httpd.apache.org Sun Apr 25 19:11:33 2010 Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 35410 invoked from network); 25 Apr 2010 19:11:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Apr 2010 19:11:33 -0000 Received: (qmail 7965 invoked by uid 500); 25 Apr 2010 19:11:32 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 7900 invoked by uid 500); 25 Apr 2010 19:11:31 -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 7893 invoked by uid 99); 25 Apr 2010 19:11:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Apr 2010 19:11:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Sun, 25 Apr 2010 19:11:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A4AE423888E3; Sun, 25 Apr 2010 19:10:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937858 - in /httpd/httpd/trunk: CHANGES modules/http/http_filters.c Date: Sun, 25 Apr 2010 19:10:45 -0000 To: cvs@httpd.apache.org From: covener@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100425191045.A4AE423888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: covener Date: Sun Apr 25 19:10:45 2010 New Revision: 937858 URL: http://svn.apache.org/viewvc?rev=937858&view=rev Log: PR49167, unexpected 413 and double-errordoc during a timeout reading a chunk-size. Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/modules/http/http_filters.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=937858&r1=937857&r2=937858&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Sun Apr 25 19:10:45 2010 @@ -28,6 +28,11 @@ Changes with Apache 2.3.7 processing is completed, avoiding orphaned callback pointers. [Brett Gervasoni , Jeff Trawick] + *) Log an error for failures to read a chunk-size, and return 400 instead + 413 when this is due to a read timeout. This change also fixes some cases + of two error documents being sent in the response for the same scenario. + [Eric Covener] PR49167 + *) mod_proxy_balancer: Add new directive BalancerNonce to allow admin to control/set the nonce used in the balancer-manager application. [Jim Jagielski] Modified: httpd/httpd/trunk/modules/http/http_filters.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?rev=937858&r1=937857&r2=937858&view=diff ============================================================================== --- httpd/httpd/trunk/modules/http/http_filters.c (original) +++ httpd/httpd/trunk/modules/http/http_filters.c Sun Apr 25 19:10:45 2010 @@ -383,8 +383,13 @@ apr_status_t ap_http_filter(ap_filter_t /* Detect chunksize error (such as overflow) */ if (rv != APR_SUCCESS || ctx->remaining < 0) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, "Error reading first chunk %s ", + (ctx->remaining < 0) ? "(overflow)" : ""); ctx->remaining = 0; /* Reset it in case we have to * come back here later */ + if (APR_STATUS_IS_TIMEUP(rv)) { + http_error = HTTP_BAD_REQUEST; + } return bail_out_on_error(ctx, f, http_error); } @@ -484,10 +489,14 @@ apr_status_t ap_http_filter(ap_filter_t /* Detect chunksize error (such as overflow) */ if (rv != APR_SUCCESS || ctx->remaining < 0) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, "Error reading chunk %s ", + (ctx->remaining < 0) ? "(overflow)" : ""); ctx->remaining = 0; /* Reset it in case we have to * come back here later */ - bail_out_on_error(ctx, f, http_error); - return rv; + if (APR_STATUS_IS_TIMEUP(rv)) { + http_error = HTTP_BAD_REQUEST; + } + return bail_out_on_error(ctx, f, http_error); } if (!ctx->remaining) {