mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Performance Tune: Do the cheap and fast length check before
we bother doing a char-by-char comparison. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@314881 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1231,9 +1231,9 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_get_worker(apr_pool_t *p,
|
||||
* 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user