[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 38/63: url: default conn->port to the same as conn-
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 38/63: url: default conn->port to the same as conn->remote_port |
Date: |
Fri, 07 Jun 2019 18:37:00 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a6183ab23a702f45b14affe7ab25996960cd8b1b
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue May 28 16:17:51 2019 +0200
url: default conn->port to the same as conn->remote_port
... so that it has a sensible value when ConnectionExists() is called which
needs it set to differentiate host "bundles" correctly on port number!
Also, make conncache:hashkey() use correct port for bundles that are proxy
vs
host connections.
Probably a regression from 7.62.0
Reported-by: Tom van der Woerdt
Fixes #3956
Closes #3957
---
lib/conncache.c | 7 +++++--
lib/url.c | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/conncache.c b/lib/conncache.c
index 2cdfd34d9..88463354b 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -163,9 +163,12 @@ static void hashkey(struct connectdata *conn, char *buf,
const char **hostp)
{
const char *hostname;
+ long port = conn->remote_port;
- if(conn->bits.httpproxy && !conn->bits.tunnel_proxy)
+ if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
hostname = conn->http_proxy.host.name;
+ port = conn->port;
+ }
else if(conn->bits.conn_to_host)
hostname = conn->conn_to_host.name;
else
@@ -178,7 +181,7 @@ static void hashkey(struct connectdata *conn, char *buf,
DEBUGASSERT(len > 32);
/* put the number first so that the hostname gets cut off if too long */
- msnprintf(buf, len, "%ld%s", conn->port, hostname);
+ msnprintf(buf, len, "%ld%s", port, hostname);
}
void Curl_conncache_unlock(struct Curl_easy *data)
diff --git a/lib/url.c b/lib/url.c
index 88d72bfea..51515c924 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2027,7 +2027,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy
*data,
}
else {
unsigned long port = strtoul(data->state.up.port, NULL, 10);
- conn->remote_port = curlx_ultous(port);
+ conn->port = conn->remote_port = curlx_ultous(port);
}
(void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] 58/63: curl_share_setopt.3: improve wording [ci ship], (continued)
- [GNUnet-SVN] [gnurl] 58/63: curl_share_setopt.3: improve wording [ci ship], gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 56/63: TODO: "at least N milliseconds between requests" [ci skip], gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 46/63: http2: Stop drain from being permanently set on, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 19/63: os400: take care of CURLOPT_SASL_AUTHZID in curl_easy_setopt_ccsid()., gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 24/63: tool_setopt: for builds with disabled-proxy, skip all proxy setopts(), gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 18/63: .github/FUNDING: mention our opencollective "home" [ci skip], gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 20/63: md4: build correctly with openssl without MD4, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 16/63: tests: Fix the line endings for the SASL alt-auth tests, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 06/63: examples: remove dead variable stores, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 26/63: sectransp: handle errSSLPeerAuthCompleted from SSLRead(), gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 38/63: url: default conn->port to the same as conn->remote_port,
gnunet <=
- [GNUnet-SVN] [gnurl] 31/63: nss: allow to specify TLS 1.3 ciphers if supported by NSS, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 36/63: multi: track users of a socket better, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 28/63: FAQ: more minor updates and spelling fixes, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 34/63: cmake: support CMAKE_OSX_ARCHITECTURES when detecting SIZEOF variables, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 41/63: url: Load if_nametoindex() dynamically from iphlpapi.dll on Windows, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 40/63: http: fix "error: equality comparison with extraneous parentheses", gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 48/63: singlesocket: use separate variable for inner loop, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 52/63: test334: verify HTTP 204 response with chunked coding header, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 47/63: RELEASE-NOTES: synced, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 44/63: system_win32: fix function prototype, gnunet, 2019/06/07