I wanted to avoid making string copies when possible. Plus, we
don't want to lowercase the URL, since that means /Foo/bar
would be the same as /FOO/Bar, which is wrong :)
Ruediger Pluem wrote:
On 10/31/2005 05:31 PM, [EMAIL PROTECTED] wrote:
Author: jim
Date: Mon Oct 31 08:31:29 2005
Since this happens for each request, doing a string copy seems
wasteful to me; it's extra overhead that is avoided with the
current impl. Instead, we have an extra assignment and
check, which is less expensive.
I originally toyed with doing the string copy, but instead
opted for a more pointer
On 11/01/2005 02:27 PM, Jim Jagielski wrote:
Since this happens for each request, doing a string copy seems
wasteful to me; it's extra overhead that is avoided with the
current impl. Instead, we have an extra assignment and
check, which is less expensive.
This is fine. My other approach was
Ruediger Pluem wrote:
On 11/01/2005 02:27 PM, Jim Jagielski wrote:
Since this happens for each request, doing a string copy seems
wasteful to me; it's extra overhead that is avoided with the
current impl. Instead, we have an extra assignment and
check, which is less expensive.
This
On 11/01/2005 02:58 PM, Jim Jagielski wrote:
[..cut..]
Certainly strncmp is quicker, since strncasecmp does an auto
tolower on each char. But we are doing that in both cases,
whether we're tolower'ing the string first, or whether we're
doing it at comparison time. So we're not saving
Ruediger Pluem wrote:
Certainly strncmp is quicker, since strncasecmp does an auto
tolower on each char. But we are doing that in both cases,
whether we're tolower'ing the string first, or whether we're
doing it at comparison time. So we're not saving anything
really there.
c = ap_strchr_c(url, ':');
if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0')
return NULL;
BTW, unless url is somehow limited to http and ftp, the above
is bad code. The proxy should be able to handle arbitrary
schemes (eventually), which means requiring scheme://host
Roy T. Fielding wrote:
c = ap_strchr_c(url, ':');
if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0')
return NULL;
BTW, unless url is somehow limited to http and ftp, the above
is bad code. The proxy should be able to handle arbitrary
schemes (eventually),
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
On 11/01/2005 04:11 PM, Jim Jagielski wrote:
Ruediger, would the below appease your sensibilities :)
Yes, it does. I am sorry. I guess I was a little too persistent in
this discussion about this patch of comparable limited influence.
I did not mean to step on your toes and nerves :-).
On 10/31/2005 05:31 PM, [EMAIL PROTECTED] wrote:
Author: jim
Date: Mon Oct 31 08:31:29 2005
New Revision: 329849
URL: http://svn.apache.org/viewcvs?rev=329849view=rev
Log:
Fix a problem where we are doing a case insensitive
match between the worker and the URL. Instead, only
the scheme
11 matches
Mail list logo