You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2005/10/12 15:06:26 UTC

svn commit: r314883 - /httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c

Author: jim
Date: Wed Oct 12 06:06:24 2005
New Revision: 314883

URL: http://svn.apache.org/viewcvs?rev=314883&view=rev
Log:
Merge r314881 from trunk:

Performance Tune: Do the cheap and fast length check before
we bother doing a char-by-char comparison. 

Reviewed by: jim

Modified:
    httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c

Modified: httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c?rev=314883&r1=314882&r2=314883&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c Wed Oct 12 06:06:24 2005
@@ -1231,9 +1231,9 @@
      * fits best to the URL.
      */
     for (i = 0; i < conf->workers->nelts; i++) {
-        if (((worker_name_length = strlen(worker->name)) <= url_length)
-            && (strncasecmp(url, worker->name, worker_name_length) == 0)
-            && (worker_name_length > max_match)) {
+        if ( ((worker_name_length = strlen(worker->name)) <= url_length)
+           && (worker_name_length > max_match)
+           && (strncasecmp(url, worker->name, worker_name_length) == 0) ) {
             max_worker = worker;
             max_match = worker_name_length;
         }