FWIW, I'm not a big fan of using the ternary op
for flow control...
On Feb 28, 2014, at 9:46 AM, [email protected] wrote:

> Author: ylavic
> Date: Fri Feb 28 14:46:50 2014
> New Revision: 1572967
> 
> URL: http://svn.apache.org/r1572967
> Log:
> mod_proxy: follows up r1572630.
> Don't reuse a SSL backend connection with no SNI for a request requiring SNI.
> 
> 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=1572967&r1=1572966&r2=1572967&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
> +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Feb 28 14:46:50 2014
> @@ -2367,9 +2367,10 @@ ap_proxy_determine_connection(apr_pool_t
>         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) {
> 
> 

Reply via email to