]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
URL: on connection re-use, still pick the new remote port
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Sep 2017 14:49:40 +0000 (16:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Sep 2017 14:49:40 +0000 (16:49 +0200)
... as when a proxy connection is being re-used, it can still get a
different remote port.

Fixes #1887
Reported-by: Oli Kingshott
lib/url.c

index 1bf3a5b86a120d60e0cce732b2615ad026e9d50e..e3b41528d9365e78da1596aefae58d0b1f00c375 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -6337,6 +6337,7 @@ static void reuse_conn(struct connectdata *old_conn,
   conn->conn_to_host = old_conn->conn_to_host;
   conn->bits.conn_to_port = old_conn->bits.conn_to_port;
   conn->conn_to_port = old_conn->conn_to_port;
+  conn->remote_port = old_conn->remote_port;
 
   /* persist connection info in session handle */
   Curl_persistconninfo(conn);