1 diff -urp httpd-2.2.24.org/server/mpm_common.c httpd-2.2.24/server/mpm_common.c
2 --- httpd-2.2.24.org/server/mpm_common.c 2013-02-16 23:51:16.000000000 +0100
3 +++ httpd-2.2.24/server/mpm_common.c 2013-04-10 21:25:06.322056566 +0200
4 @@ -648,6 +648,7 @@ static apr_status_t dummy_connection(ap_
10 /* create a temporary pool for the socket. pconf stays around too long */
11 rv = apr_pool_create(&p, pod->p);
12 @@ -655,8 +656,19 @@ static apr_status_t dummy_connection(ap_
16 - rv = apr_socket_create(&sock, ap_listeners->bind_addr->family,
18 + /* If possible, find a listener which is configured for
19 + * plain-HTTP, not SSL; using an SSL port would either be
20 + * expensive to do correctly (performing a complete SSL handshake)
21 + * or cause log spam by doing incorrectly (simply sending EOF). */
23 + while (lp && lp->protocol && strcasecmp(lp->protocol, "http") != 0) {
30 + rv = apr_socket_create(&sock, lp->bind_addr->family, SOCK_STREAM, 0, p);
31 if (rv != APR_SUCCESS) {
32 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
33 "get socket to connect to listener");
34 @@ -679,7 +691,7 @@ static apr_status_t dummy_connection(ap_
38 - rv = apr_socket_connect(sock, ap_listeners->bind_addr);
39 + rv = apr_socket_connect(sock, lp->bind_addr);
40 if (rv != APR_SUCCESS) {
41 int log_level = APLOG_WARNING;
43 @@ -692,12 +704,12 @@ static apr_status_t dummy_connection(ap_
46 ap_log_error(APLOG_MARK, log_level, rv, ap_server_conf,
47 - "connect to listener on %pI", ap_listeners->bind_addr);
48 + "connect to listener on %pI", lp->bind_addr);
53 - if (ap_listeners->protocol && strcasecmp(ap_listeners->protocol, "https") == 0) {
54 + if (lp->protocol && strcasecmp(lp->protocol, "https") == 0) {
55 /* Send a TLS 1.0 close_notify alert. This is perhaps the
56 * "least wrong" way to open and cleanly terminate an SSL
57 * connection. It should "work" without noisy error logs if