You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2014/03/01 22:36:27 UTC

svn commit: r1573229 - /httpd/httpd/trunk/modules/proxy/proxy_util.c

Author: ylavic
Date: Sat Mar  1 21:36:27 2014
New Revision: 1573229

URL: http://svn.apache.org/r1573229
Log:
mod_proxy: Add comment and avoid ternary operator as condition (no functional change).

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1573229&r1=1573228&r2=1573229&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Sat Mar  1 21:36:27 2014
@@ -2367,10 +2367,14 @@ ap_proxy_determine_connection(apr_pool_t
         else {
             ssl_hostname = conn->hostname;
         }
-        if (conn->ssl_hostname != NULL
-                ? (ssl_hostname == NULL || strcasecmp(conn->ssl_hostname,
-                                                      ssl_hostname) != 0)
-                : (ssl_hostname != NULL && conn->sock)) {
+        /*
+         * Close if a SNI is in use but this request requires no or
+         * a different one, or no SNI is in use but one is required.
+         */
+        if ((conn->ssl_hostname && (!ssl_hostname ||
+                                    strcasecmp(conn->ssl_hostname,
+                                               ssl_hostname) != 0)) ||
+                (!conn->ssl_hostname && ssl_hostname && conn->sock)) {
             socket_cleanup(conn);
         }
         if (conn->ssl_hostname == NULL) {