From: Eric Covener Date: Mon, 26 Apr 2010 23:05:29 +0000 (+0000) Subject: Use the more specific 408 (timed out) instead of a generic 400 during a timeout X-Git-Tag: 2.3.6~155 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f27623efc53a67cbdee41a6f87fcf5589f34928;p=thirdparty%2Fapache%2Fhttpd.git Use the more specific 408 (timed out) instead of a generic 400 during a timeout reading a chunk-length. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@938265 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7c3518cac5e..a7b63f680f6 100644 --- a/CHANGES +++ b/CHANGES @@ -28,7 +28,7 @@ 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 + *) Log an error for failures to read a chunk-size, and return 408 instead of 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 diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index abccc1b56f0..9f979b4cd68 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -388,7 +388,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, 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; + http_error = HTTP_REQUEST_TIME_OUT; } return bail_out_on_error(ctx, f, http_error); } @@ -494,7 +494,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, 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; + http_error = HTTP_REQUEST_TIME_OUT; } return bail_out_on_error(ctx, f, http_error); }