summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-05-31 08:59:24 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-06-15 10:49:49 +0200
commitb67d3ba73e98cba63dc6246ee0da22ea803ec3e8 (patch)
tree5a572311875f11ebd262eaf75d81d6a35b6e9548 /include
parent8f717b6cf0e55a4caaac4550221b97559a1f9b57 (diff)
downloadcurl-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 'include')
-rw-r--r--include/curl/urlapi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/curl/urlapi.h b/include/curl/urlapi.h
index 7343cb659..1eadc6e3a 100644
--- a/include/curl/urlapi.h
+++ b/include/curl/urlapi.h
@@ -79,6 +79,7 @@ typedef enum {
#define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */
#define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the
scheme is unknown. */
+#define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */
typedef struct Curl_URL CURLU;