summaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-11-23 14:16:38 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-11-25 08:33:48 +0100
commita5f5687368a5f95415d58d37e8dfb10c6b6d44c5 (patch)
tree3c734343cfa45c8dc5685e7e57bc66df14343400 /lib/transfer.c
parent0969805e20ffe3731a9b020a990a907c3eec907f (diff)
downloadcurl-a5f5687368a5f95415d58d37e8dfb10c6b6d44c5.tar.gz
urlapi: make Curl_is_absolute_url always use MAX_SCHEME_LEN
Instad of having all callers pass in the maximum length, always use it. The passed in length is instead used only as the length of the target buffer for to storing the scheme name in, if used. Added the scheme max length restriction to the curl_url_set.3 man page. Follow-up to 45bcb2eaa78c79 Closes #8047
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 05fec7998..22704fa15 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1631,7 +1631,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
if((type != FOLLOW_RETRY) &&
(data->req.httpcode != 401) && (data->req.httpcode != 407) &&
- Curl_is_absolute_url(newurl, NULL, MAX_SCHEME_LEN))
+ Curl_is_absolute_url(newurl, NULL, 0))
/* If this is not redirect due to a 401 or 407 response and an absolute
URL: don't allow a custom port number */
disallowport = TRUE;