From: Daniel Stenberg Date: Thu, 14 Sep 2017 14:49:40 +0000 (+0200) Subject: URL: on connection re-use, still pick the new remote port X-Git-Tag: curl-7_56_0~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22708eae40411f6c02e76632aa5d5d852b08a214;p=thirdparty%2Fcurl.git URL: on connection re-use, still pick the new remote port ... as when a proxy connection is being re-used, it can still get a different remote port. Fixes #1887 Reported-by: Oli Kingshott --- diff --git a/lib/url.c b/lib/url.c index 1bf3a5b86a..e3b41528d9 100644 --- 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);