From 9307c219ad4741db860b864c860ac2f8bf9fad9d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 19 Sep 2018 10:17:03 +0200 Subject: urlapi: add CURLU_GUESS_SCHEME and fix hostname acceptance In order for this API to fully work for libcurl itself, it now offers a CURLU_GUESS_SCHEME flag that makes it "guess" scheme based on the host name prefix just like libcurl always did. If there's no known prefix, it will guess "http://". Separately, it relaxes the check of the host name so that IDN host names can be passed in as well. Both these changes are necessary for libcurl itself to use this API. Assisted-by: Daniel Gustafsson Closes #3018 --- include/curl/urlapi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/urlapi.h b/include/curl/urlapi.h index b16cfce56..319de35b7 100644 --- a/include/curl/urlapi.h +++ b/include/curl/urlapi.h @@ -75,6 +75,7 @@ typedef enum { #define CURLU_URLDECODE (1<<6) /* URL decode on get */ #define CURLU_URLENCODE (1<<7) /* URL encode on set */ #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ +#define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ typedef struct Curl_URL CURLU; -- cgit v1.2.3