mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:43:47 +03:00
urlapi: add CURLU_NO_GUESS_SCHEME
Used for extracting: - when used asking for a scheme, it will return CURLUE_NO_SCHEME if the stored information was a guess - when used asking for a URL, the URL is returned without a scheme, like when previously given to the URL parser when it was asked to guess - as soon as the scheme is set explicitly, it is no longer internally marked as guessed The idea being: 1. allow a user to figure out if a URL's scheme was set as a result of guessing 2. extract the URL without a guessed scheme 3. this makes it work similar to how we already deal with port numbers Extend test 1560 to verify. Closes #13616
This commit is contained in:
parent
80aa519545
commit
655d44d139
5 changed files with 38 additions and 2 deletions
|
|
@ -102,6 +102,7 @@ typedef enum {
|
|||
#define CURLU_GET_EMPTY (1<<14) /* allow empty queries and fragments
|
||||
when extracting the URL or the
|
||||
components */
|
||||
#define CURLU_NO_GUESS_SCHEME (1<<14) /* for get, don't accept a guess */
|
||||
|
||||
typedef struct Curl_URL CURLU;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue