summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-23 00:24:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-23 00:24:59 +0100
commited8748369863dc2c1dfccbc6a2e60880a4e612e3 (patch)
treeeee38061e4d8ca29223bc64c0ab778eb5ff50add /lib
parentd3d90ad9c00530d0ab8154b51050da12500b44bd (diff)
downloadcurl-bagder/http-get-proxy-url-port.tar.gz
http: strip default port from URL sent to proxybagder/http-get-proxy-url-port
To make sure the Host: header and the URL provide the same authority portion when sent to the proxy, strip the default port number from the URL if one was provided. Reported-by: Michael Brown Fixes #6769 Closes #[fill in]
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index 7ec03e9bd..cb065ed58 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2189,7 +2189,7 @@ CURLcode Curl_http_target(struct Curl_easy *data,
/* Extract the URL to use in the request. Store in STRING_TEMP_URL for
clean-up reasons if the function returns before the free() further
down. */
- uc = curl_url_get(h, CURLUPART_URL, &url, 0);
+ uc = curl_url_get(h, CURLUPART_URL, &url, CURLU_NO_DEFAULT_PORT);
if(uc) {
curl_url_cleanup(h);
return CURLE_OUT_OF_MEMORY;