You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2005/08/08 16:37:16 UTC

svn commit: r230808 - /httpd/httpd/trunk/server/mpm_common.c

Author: pquerna
Date: Mon Aug  8 07:37:14 2005
New Revision: 230808

URL: http://svn.apache.org/viewcvs?rev=230808&view=rev
Log:
Add a User-Agent to the dummy connection code to ease admin debugging.

Submitted By: Colm MacCarthaigh <colm stdlib.net>

Modified:
    httpd/httpd/trunk/server/mpm_common.c

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm_common.c?rev=230808&r1=230807&r2=230808&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Mon Aug  8 07:37:14 2005
@@ -546,7 +546,7 @@
  */
 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 @@
                      "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().