From: Paul Querna Date: Mon, 8 Aug 2005 14:37:14 +0000 (+0000) Subject: Add a User-Agent to the dummy connection code to ease admin debugging. X-Git-Tag: 2.1.7~5^2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc2db72ca11f907909417edad880b8ad7fd0e87f;p=apache Add a User-Agent to the dummy connection code to ease admin debugging. Submitted By: Colm MacCarthaigh git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@230808 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm_common.c b/server/mpm_common.c index b4343004b9..8554c52e6b 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -546,7 +546,7 @@ static apr_status_t pod_signal_internal(ap_pod_t *pod) */ static apr_status_t dummy_connection(ap_pod_t *pod) { - const char *srequest = "GET / HTTP/1.0\r\n\r\n"; + char *srequest; apr_status_t rv; apr_socket_t *sock; apr_pool_t *p; @@ -598,6 +598,14 @@ static apr_status_t dummy_connection(ap_pod_t *pod) "connect to listener on %pI", ap_listeners->bind_addr); } + /* Create the request string. We include a User-Agent so that + * adminstrators can track down the cause of the odd-looking + * requests in their logs. + */ + srequest = apr_pstrcat(p, "GET / HTTP/1.0\r\nUser-Agent: ", + ap_get_server_version(), + " (internal dummy connection)\r\n\r\n", NULL); + /* Since some operating systems support buffering of data or entire * requests in the kernel, we send a simple request, to make sure * the server pops out of a blocking accept().