On Mon, Dec 22, 2014 at 4:56 AM, Ruediger Pluem <[email protected]> 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.

Reply via email to