aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-04-23 13:34:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-04-23 13:34:28 +0000
commit471f1d694f1495941e338410374f64a44c5a4175 (patch)
treeadd63eab0f351e059b0e94c2046ad6ce20c30b9c
parent495f6f6bd335d8f5244936f5850aa25355e2dfd2 (diff)
fixes bug report #547484, no_proxy doesn't properly strip off port numbers
from the host names before comparing
-rw-r--r--lib/url.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index fbe7afc94..514cbd0dc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1611,9 +1611,16 @@ static CURLcode CreateConnection(struct SessionHandle *data,
nope=no_proxy?strtok_r(no_proxy, ", ", &no_proxy_tok_buf):NULL;
while(nope) {
- if(strlen(nope) <= strlen(conn->name)) {
+ int namelen;
+ char *endptr = strchr(conn->name, ':');
+ if(endptr)
+ namelen=endptr-conn->name;
+ else
+ namelen=strlen(conn->name);
+
+ if(strlen(nope) <= namelen) {
char *checkn=
- conn->name + strlen(conn->name) - strlen(nope);
+ conn->name + namelen - strlen(nope);
if(strnequal(nope, checkn, strlen(nope))) {
/* no proxy for this host! */
break;