From: Mladen Turk Date: Sat, 9 Apr 2005 10:39:50 +0000 (+0000) Subject: Return correct status codes in case of bad request, that X-Git-Tag: 2.1.5~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=000d9acf74bc3551085e587057404dadf9398ac0;p=thirdparty%2Fapache%2Fhttpd.git Return correct status codes in case of bad request, that is probably too large for AJP protocol. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160677 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index e38281e1afa..1f205ee34c6 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -130,7 +130,10 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, "proxy: AJP: request failed to %pI (%s)", conn->worker->cp->addr, conn->worker->hostname); - return HTTP_SERVICE_UNAVAILABLE; + if (status == AJP_EOVERFLOW) + return HTTP_BAD_REQUEST; + else + return HTTP_SERVICE_UNAVAILABLE; } /* allocate an AJP message to store the data of the buckets */ @@ -138,7 +141,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: ajp_alloc_data_msg failed"); - return status; + return HTTP_INTERNAL_SERVER_ERROR; } /* read the first bloc of data */ input_brigade = apr_brigade_create(p, r->connection->bucket_alloc);