]> granicus.if.org Git - apache/commitdiff
Return correct status codes in case of bad request, that
authorMladen Turk <mturk@apache.org>
Sat, 9 Apr 2005 10:39:50 +0000 (10:39 +0000)
committerMladen Turk <mturk@apache.org>
Sat, 9 Apr 2005 10:39:50 +0000 (10:39 +0000)
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

modules/proxy/mod_proxy_ajp.c

index e38281e1afa0914e12c08781efae30ad87aae20a..1f205ee34c643919c9b4be83cffa7afa7111fed8 100644 (file)
@@ -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);