httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r616335 - in /httpd/httpd/trunk: CHANGES modules/proxy/proxy_util.c
Date Tue, 29 Jan 2008 21:09:36 GMT


On 01/29/2008 09:59 PM, Jim Jagielski wrote:
> 
> On Jan 29, 2008, at 3:43 PM, Ruediger Pluem wrote:
> 
>>
>>
>> On 01/29/2008 03:26 PM, jim@apache.org wrote:
>>> Author: jim
>>> Date: Tue Jan 29 06:26:20 2008
>>> New Revision: 616335
>>>
>>> URL: http://svn.apache.org/viewvc?rev=616335&view=rev
>>> Log:
>>> Now let things like
>>>
>>>    ProxyPassReverse /foo balancer://bar
>>>
>>> work "as expected" :) :)
>>
>> I guess it may not in the case of members with the schemes
>> ajp:// or fcgi:// :-).
>>
>>
> 
> :)
> 
> Well, if that's how they construct their Location headers :)
> 
>> I guess we can shortcut here by
>>
>>
>>               return url;

Oops. My fault. We need to continue in the loop, but I guess we can do
the following to avoid an unneeded strncasecmp

Index: proxy_util.c
===================================================================
--- proxy_util.c        (Revision 616517)
+++ proxy_util.c        (Arbeitskopie)
@@ -1108,11 +1108,12 @@
                 worker++;
             }
         }
-
-        l2 = strlen(real);
-        if (l1 >= l2 && strncasecmp(real, url, l2) == 0) {
-            u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
-            return ap_construct_url(r->pool, u, r);
+        else {
+            l2 = strlen(real);
+            if (l1 >= l2 && strncasecmp(real, url, l2) == 0) {
+                u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
+                return ap_construct_url(r->pool, u, r);
+            }
         }
     }

or simply

Index: proxy_util.c
===================================================================
--- proxy_util.c        (Revision 616517)
+++ proxy_util.c        (Arbeitskopie)
@@ -1107,6 +1107,7 @@
                 }
                 worker++;
             }
+            continue;
         }

         l2 = strlen(real);


Regards

RĂ¼diger

Mime
View raw message