You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2014/12/22 10:56:51 UTC

Re: svn commit: r1647009 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_proxy.xml docs/manual/mod/mod_proxy_fcgi.xml include/ap_mmn.h modules/proxy/mod_proxy.c modules/proxy/mod_proxy.h modules/proxy/proxy_util.c


On 12/20/2014 04:56 PM, covener@apache.org wrote:
> Author: covener
> Date: Sat Dec 20 15:56:16 2014
> New Revision: 1647009
> 
> URL: http://svn.apache.org/r1647009
> Log:
> Allow SetHandler+UDS+fcgi to take advantage of dedicated workers including
> opting in to connection reuse and other proxy options (max=, etc).
> 
> adds 'enablereuse' proxyoption and a minor MMN bump to share
> proxy_desocketfy outside of mod_proxy.c, which is required to
> match workers to URLs.
> 
> 
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
>     httpd/httpd/trunk/docs/manual/mod/mod_proxy_fcgi.xml
>     httpd/httpd/trunk/include/ap_mmn.h
>     httpd/httpd/trunk/modules/proxy/mod_proxy.c
>     httpd/httpd/trunk/modules/proxy/mod_proxy.h
>     httpd/httpd/trunk/modules/proxy/proxy_util.c
> 

> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1647009&r1=1647008&r2=1647009&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Sat Dec 20 15:56:16 2014
           */
> @@ -1477,15 +1486,16 @@ static const char *
>      return add_proxy(cmd, dummy, f1, r1, 1);
>  }
>  
> -static char *de_socketfy(apr_pool_t *p, char *url)
> +PROXY_DECLARE(char *) ap_proxy_de_socketfy(apr_pool_t *p, const char *url)
>  {
>      char *ptr;
>      /*
>       * We could be passed a URL during the config stage that contains
>       * the UDS path... ignore it
>       */
> +    char *url_copy = apr_pstrdup(p, url);

Why do we need to make a copy?

>      if (!strncasecmp(url, "unix:", 5) &&
> -        ((ptr = ap_strchr(url, '|')) != NULL)) {
> +        ((ptr = ap_strchr(url_copy, '|')) != NULL)) {
>          /* move past the 'unix:...|' UDS path info */
>          char *ret, *c;
>  

Regards

RĂ¼diger


Re: svn commit: r1647009 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_proxy.xml docs/manual/mod/mod_proxy_fcgi.xml include/ap_mmn.h modules/proxy/mod_proxy.c modules/proxy/mod_proxy.h modules/proxy/proxy_util.c

Posted by Eric Covener <co...@gmail.com>.
On Mon, Dec 22, 2014 at 4:56 AM, Ruediger Pluem <rp...@apache.org> wrote:
>> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1647009&r1=1647008&r2=1647009&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
>> +++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Sat Dec 20 15:56:16 2014
>            */
>> @@ -1477,15 +1486,16 @@ static const char *
>>      return add_proxy(cmd, dummy, f1, r1, 1);
>>  }
>>
>> -static char *de_socketfy(apr_pool_t *p, char *url)
>> +PROXY_DECLARE(char *) ap_proxy_de_socketfy(apr_pool_t *p, const char *url)
>>  {
>>      char *ptr;
>>      /*
>>       * We could be passed a URL during the config stage that contains
>>       * the UDS path... ignore it
>>       */
>> +    char *url_copy = apr_pstrdup(p, url);
>
> Why do we need to make a copy?
>
>>      if (!strncasecmp(url, "unix:", 5) &&
>> -        ((ptr = ap_strchr(url, '|')) != NULL)) {
>> +        ((ptr = ap_strchr(url_copy, '|')) != NULL)) {
>>          /* move past the 'unix:...|' UDS path info */
>>          char *ret, *c;
>>

Thanks -- I was trying to keep the parameter const and the return
value non-const when I moved it from static to API, but it was not
well done and it seems none of the callers actually need that.  I
removed the copy and made the return value const r1647334.