From: William A. Rowe Jr Date: Mon, 20 Jun 2005 17:27:48 +0000 (+0000) Subject: These failure cases are all essentially bogus submissions to httpd, X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc60a19c0255b064d529a5c7a9377c840fba0086;p=thirdparty%2Fapache%2Fhttpd.git These failure cases are all essentially bogus submissions to httpd, do not persist the connection if the client can't formulate any respectible request (e.g. likely to be exploit testing). [None of the modified failure cases occur prior to request processing.] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@191517 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/http_protocol.c b/src/main/http_protocol.c index 19a62cdd272..28bec04335c 100644 --- a/src/main/http_protocol.c +++ b/src/main/http_protocol.c @@ -1186,6 +1186,7 @@ API_EXPORT(request_rec *) ap_read_request(conn_rec *conn) ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, "request failed: URI too long"); + r->connection->keepalive = 0; ap_send_error_response(r, 0); ap_log_transaction(r); return r; @@ -1194,6 +1195,7 @@ API_EXPORT(request_rec *) ap_read_request(conn_rec *conn) ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, "request failed: erroneous characters after protocol string: %s", ap_escape_logitem(r->pool, r->the_request)); + r->connection->keepalive = 0; ap_send_error_response(r, 0); ap_log_transaction(r); return r; @@ -1207,6 +1209,7 @@ API_EXPORT(request_rec *) ap_read_request(conn_rec *conn) if (r->status != HTTP_REQUEST_TIME_OUT) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, "request failed: error reading the headers"); + r->connection->keepalive = 0; ap_send_error_response(r, 0); ap_log_transaction(r); return r; @@ -1260,6 +1263,7 @@ API_EXPORT(request_rec *) ap_read_request(conn_rec *conn) "(see RFC2616 section 14.23): %s", r->uri); } if (r->status != HTTP_OK) { + r->connection->keepalive = 0; ap_send_error_response(r, 0); ap_log_transaction(r); return r;