You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2014/03/01 19:24:09 UTC

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

FWIW, I'm not a big fan of using the ternary op
for flow control...
On Feb 28, 2014, at 9:46 AM, ylavic@apache.org 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) {
> 
> 


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

Posted by Jim Jagielski <ji...@jaguNET.com>.
:)

On Mar 1, 2014, at 4:38 PM, Yann Ylavic <yl...@gmail.com> wrote:

> Yes you're right, it is sometimes surprising.
> Modified in r1573229.
> 
> 
> On Sat, Mar 1, 2014 at 7:24 PM, Jim Jagielski <ji...@jagunet.com> wrote:
> FWIW, I'm not a big fan of using the ternary op
> for flow control...
> On Feb 28, 2014, at 9:46 AM, ylavic@apache.org 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) {
> >
> >
> 
> 


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

Posted by Yann Ylavic <yl...@gmail.com>.
Yes you're right, it is sometimes surprising.
Modified in r1573229.


On Sat, Mar 1, 2014 at 7:24 PM, Jim Jagielski <ji...@jagunet.com> wrote:

> FWIW, I'm not a big fan of using the ternary op
> for flow control...
> On Feb 28, 2014, at 9:46 AM, ylavic@apache.org 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) {
> >
> >
>
>