From 35e0b8cd512a8f8a66f82cf344cef2d1b039e90e Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Mon, 25 Oct 2004 06:40:08 +0000 Subject: [PATCH] This will put some messages in the error log when some people try a lame 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105583 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ server/protocol.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 3e9f94a4f5b..4e89728f8b8 100644 --- 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ü ] diff --git a/server/protocol.c b/server/protocol.c index 81904a40a5e..05ce5ff9c10 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -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)); -- 2.47.2