96e0b33
96e0b33
Hack to send the dummy HTTP request only to the first listener 
96e0b33
configured, to avoid spamming the SSL vhost in the default install.
96e0b33
96e0b33
In 2.2 lr->protocol could be used instead to do this properly, if
96e0b33
that was actually initialized properly by mod_ssl.
96e0b33
91afecf
Upstream-Status: not submitted, ugly hack which only makes a difference
91afecf
		to the default configuration used in Fedora.  Need to find
91afecf
		a way to do this properly.
91afecf
96e0b33
--- httpd-2.1.10/server/mpm_common.c.pod
96e0b33
+++ httpd-2.1.10/server/mpm_common.c
96e0b33
@@ -583,6 +584,7 @@
96e0b33
     apr_socket_t *sock;
96e0b33
     apr_pool_t *p;
96e0b33
     apr_size_t len;
96e0b33
+    ap_listen_rec *lr;
96e0b33
 
96e0b33
     /* create a temporary pool for the socket.  pconf stays around too long */
96e0b33
     rv = apr_pool_create(&p, pod->p);
96e0b33
@@ -590,8 +592,11 @@
96e0b33
         return rv;
96e0b33
     }
96e0b33
 
96e0b33
-    rv = apr_socket_create(&sock, ap_listeners->bind_addr->family,
96e0b33
-                           SOCK_STREAM, 0, p);
96e0b33
+    /* Find an HTTP listener specified first in the configuration. */
96e0b33
+    for (lr = ap_listeners; lr->next != NULL; lr = lr->next)
96e0b33
+        /* noop */;
96e0b33
+
96e0b33
+    rv = apr_socket_create(&sock, lr->bind_addr->family, SOCK_STREAM, 0, p);
96e0b33
     if (rv != APR_SUCCESS) {
96e0b33
         ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
96e0b33
                      "get socket to connect to listener");
96e0b33
@@ -614,7 +619,7 @@
96e0b33
         return rv;
96e0b33
     }
96e0b33
 
96e0b33
-    rv = apr_socket_connect(sock, ap_listeners->bind_addr);
96e0b33
+    rv = apr_socket_connect(sock, lr->bind_addr);
96e0b33
     if (rv != APR_SUCCESS) {
96e0b33
         int log_level = APLOG_WARNING;
96e0b33
 
96e0b33
@@ -627,7 +632,7 @@
96e0b33
         }
96e0b33
 
96e0b33
         ap_log_error(APLOG_MARK, log_level, rv, ap_server_conf,
96e0b33
-                     "connect to listener on %pI", ap_listeners->bind_addr);
37e4a81
+                     "connect to listener on %pI", lr->bind_addr);
96e0b33
     }
96e0b33
 
96e0b33
     /* Create the request string. We include a User-Agent so that