]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
This will put some messages in the error log when some people try a lame
authorPaul Querna <pquerna@apache.org>
Mon, 25 Oct 2004 06:40:08 +0000 (06:40 +0000)
committerPaul Querna <pquerna@apache.org>
Mon, 25 Oct 2004 06:40:08 +0000 (06:40 +0000)
DoS by just opening a socket, and never sending any data.

Ivan suggested such a change about a month ago, to match the 1.3 behavoir.

Today I helped OSU's Admins figure out that someone was trying this 'attack'
against their mirror server.  The server status just showed hundreds of
Apache Children stuck in Reading.  This will at least hint to the admins
where the problem is by telling them about it in the error log.

Inspired by: Rici Lake, Ivan Ristic <ivanr webkreator.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105583 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 3e9f94a4f5b5daacab169256f4ecbbd3230d6726..4e89728f8b89fb574664c9a9f5ffb480619bff30 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) core: Add a warning message if the request line read fails.
+     [Paul Querna]
+
   *) mod_cache: Add CacheIgnoreHeaders directive.  PR 30399.
      [Rüiger Plü <r.pluem t-online.de>]
 
index 81904a40a5e093b9363ebc48570e885bbe1905df..05ce5ff9c10ac0bc334df572171229fb28c69f0a 100644 (file)
@@ -603,7 +603,10 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
                 r->proto_num = HTTP_VERSION(1,0);
                 r->protocol  = apr_pstrdup(r->pool, "HTTP/1.0");
             }
-
+            else if (r->connection->keepalive != AP_CONN_KEEPALIVE) {
+                ap_log_rerror(APLOG_MARK, APLOG_NOTICE, rv, r,
+                              "request line read error.");
+            }
             return 0;
         }
     } while ((len <= 0) && (++num_blank_lines < max_blank_lines));