]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
These failure cases are all essentially bogus submissions to httpd,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 20 Jun 2005 17:27:48 +0000 (17:27 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 20 Jun 2005 17:27:48 +0000 (17:27 +0000)
  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

src/main/http_protocol.c

index 19a62cdd2725029ffdeda8f0a59e1733517a5411..28bec04335cb3f8bd3a124369144b8353d0cd726 100644 (file)
@@ -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;