aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-29 10:10:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-29 10:10:21 +0000
commit42a9d96faebb068516697473a6180c0027c65e6f (patch)
treede5d857905082a4926d2c442c99f0bd325a69178 /lib/url.c
parent3edd9b4dfce900fb80918c056553c2cfde10b6e1 (diff)
fixed conn->name error on connection re-use and enlarged the 'gname' array
to hold 512 bytes (for user+password+hostname)
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index 60be9322e..e16766fce 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1280,14 +1280,14 @@ static CURLcode CreateConnection(struct SessionHandle *data,
strcpy(conn->path, "/");
if (2 > sscanf(data->change.url,
- "%64[^\n:]://%256[^\n/]%[^\n]",
+ "%64[^\n:]://%512[^\n/]%[^\n]",
conn->protostr, conn->gname, conn->path)) {
/*
* The URL was badly formatted, let's try the browser-style _without_
* protocol specified like 'http://'.
*/
- if((1 > sscanf(data->change.url, "%256[^\n/]%[^\n]",
+ if((1 > sscanf(data->change.url, "%512[^\n/]%[^\n]",
conn->gname, conn->path)) ) {
/*
* We couldn't even get this format.
@@ -1872,7 +1872,6 @@ static CURLcode CreateConnection(struct SessionHandle *data,
conn = conn_temp; /* use this connection from now on */
/* we need these pointers if we speak over a proxy */
- conn->name = conn->gname;
conn->hostname = old_conn->gname;
free(conn->path); /* free the previously allocated path pointer */