diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-05-31 08:59:24 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-15 10:49:49 +0200 |
commit | b67d3ba73e98cba63dc6246ee0da22ea803ec3e8 (patch) | |
tree | 5a572311875f11ebd262eaf75d81d6a35b6e9548 /docs/libcurl | |
parent | 8f717b6cf0e55a4caaac4550221b97559a1f9b57 (diff) | |
download | curl-b67d3ba73e98cba63dc6246ee0da22ea803ec3e8.tar.gz |
curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE
They were never officially allowed and slipped in only due to sloppy
parsing. Spaces (ascii 32) should be correctly encoded (to %20) before
being part of a URL.
The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl
allow spaces.
Updated test 1560 to verify.
Closes #7073
Diffstat (limited to 'docs/libcurl')
-rw-r--r-- | docs/libcurl/curl_url_set.3 | 9 | ||||
-rw-r--r-- | docs/libcurl/symbols-in-versions | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/libcurl/curl_url_set.3 b/docs/libcurl/curl_url_set.3 index 8d77a8a03..5c795bde0 100644 --- a/docs/libcurl/curl_url_set.3 +++ b/docs/libcurl/curl_url_set.3 @@ -125,6 +125,15 @@ When set for \fBCURLUPART_URL\fP, this makes libcurl skip the normalization of the path. That's the procedure where curl otherwise removes sequences of dot-slash and dot-dot etc. The same option used for transfers is called \fICURLOPT_PATH_AS_IS(3)\fP. +.IP CURLU_ALLOW_SPACE +If set, a the URL parser allows space (ASCII 32) where possible. The URL +syntax does normally not allow spaces anywhere, but they should be encoded as +%20 or '+'. When spaces are allowed, they are still not allowed in the scheme. +When space is used and allowed in a URL, it will be stored as-is unless +\fICURLU_URLENCODE\fP is also set, which then makes libcurl URL-encode the +space before stored. This affects how the URL will be constructed when +\fIcurl_url_get(3)\fP is subsequently used to extract the full URL or +individual parts. .SH RETURN VALUE Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went fine. diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 1684284cd..2dc0af2c9 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -865,6 +865,7 @@ CURLUSESSL_ALL 7.17.0 CURLUSESSL_CONTROL 7.17.0 CURLUSESSL_NONE 7.17.0 CURLUSESSL_TRY 7.17.0 +CURLU_ALLOW_SPACE 7.78.0 CURLU_APPENDQUERY 7.62.0 CURLU_DEFAULT_PORT 7.62.0 CURLU_DEFAULT_SCHEME 7.62.0 |