diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-21 22:24:56 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-21 22:24:56 +0000 |
commit | ec585e8907ac8df8c1545f1cd7e2567edf284d08 (patch) | |
tree | f8abf221a774e716f2f9a0604b8dd7c3d759d045 /lib | |
parent | 0aeb25ff3b7e23b12212fb3d18b70fb75917d87b (diff) |
When re-using a connection, make sure that we use the current host name as
we might actually re-use a connection to a different host, when using proxies!
This was what bug report #558888 was all about.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2129,6 +2129,10 @@ static CURLcode CreateConnection(struct SessionHandle *data, free(old_conn->proxyhost); conn = conn_temp; /* use this connection from now on */ + /* If we speak over a proxy, we need to copy the host name too, as it + might be another remote host even when re-using a connection */ + strcpy(conn->gname, old_conn->gname); /* safe strcpy() */ + /* we need these pointers if we speak over a proxy */ conn->hostname = conn->gname; conn->name = &conn->gname[old_conn->name - old_conn->gname]; |