Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 41149 invoked from network); 1 Nov 2005 15:12:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Nov 2005 15:12:09 -0000 Received: (qmail 75962 invoked by uid 500); 1 Nov 2005 15:12:04 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 75897 invoked by uid 500); 1 Nov 2005 15:12:03 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 75883 invoked by uid 99); 1 Nov 2005 15:12:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 07:12:03 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.133.199.10] (HELO jimsys.jagunet.com) (209.133.199.10) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 07:11:59 -0800 Received: from [127.0.0.1] (localhost [127.0.0.1]) by jimsys.jagunet.com (Postfix) with ESMTP id 779BB77F8D9; Tue, 1 Nov 2005 10:11:40 -0500 (EST) In-Reply-To: <590ae4e87b0214c9ae7a4aebd581da90@gbiv.com> References: <20051031163134.43778.qmail@minotaur.apache.org> <43669ADC.70003@apache.org> <590ae4e87b0214c9ae7a4aebd581da90@gbiv.com> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Ruediger Pluem Content-Transfer-Encoding: 7bit From: Jim Jagielski Subject: Re: svn commit: r329849 - in /httpd/httpd/trunk: CHANGES modules/proxy/proxy_util.c Date: Tue, 1 Nov 2005 10:11:39 -0500 To: dev@httpd.apache.org X-Mailer: Apple Mail (2.734) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Ruediger, would the below appease your sensibilities :) Index: modules/proxy/proxy_util.c =================================================================== --- modules/proxy/proxy_util.c (revision 329779) +++ modules/proxy/proxy_util.c (working copy) @@ -1217,13 +1217,33 @@ int url_length; int worker_name_length; const char *c; + char *url_copy; int i; c = ap_strchr_c(url, ':'); if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') return NULL; + url_copy = apr_pstrdup(p, url); url_length = strlen(url); + + /* + * We need to find the start of the path and + * therefore we know the length of the scheme://hostname/ + * part to we can force-lowercase everything up to + * the start of the path. + */ + c = ap_strchr_c(c+3, '/'); + if (c) { + char *pathstart; + pathstart = url_copy + (c - url); + pathstart = '\0'; + ap_str_tolower(url_copy); + pathstart = '/'; + } else { + ap_str_tolower(url_copy); + } + worker = (proxy_worker *)conf->workers->elts; /* @@ -1233,7 +1253,7 @@ for (i = 0; i < conf->workers->nelts; i++) { if ( ((worker_name_length = strlen(worker->name)) <= url_length) && (worker_name_length > max_match) - && (strncasecmp(url, worker->name, worker_name_length) == 0) ) { + && (strncmp(url_copy, worker->name, worker_name_length) == 0) ) { max_worker = worker; max_match = worker_name_length; }