]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy: follows up r1572630.
authorYann Ylavic <ylavic@apache.org>
Fri, 28 Feb 2014 14:46:50 +0000 (14:46 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 28 Feb 2014 14:46:50 +0000 (14:46 +0000)
Don't reuse a SSL backend connection with no SNI for a request requiring SNI.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572967 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index 27cd0f456fe22e9df105b77c0a34fce729b6ea56..7fafbfdcf350a339e210d1adcd46d77120424c46 100644 (file)
@@ -2367,9 +2367,10 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
         else {
             ssl_hostname = conn->hostname;
         }
-        if (conn->ssl_hostname != NULL &&
-                (!ssl_hostname || strcasecmp(conn->ssl_hostname,
-                                             ssl_hostname) != 0)) {
+        if (conn->ssl_hostname != NULL
+                ? (ssl_hostname == NULL || strcasecmp(conn->ssl_hostname,
+                                                      ssl_hostname) != 0)
+                : (ssl_hostname != NULL && conn->sock)) {
             socket_cleanup(conn);
         }
         if (conn->ssl_hostname == NULL) {