mirror of
https://github.com/curl/curl.git
synced 2026-08-02 20:50:29 +03:00
urlapi: add CURLU_GET_EMPTY for empty queries and fragments
By default the API inhibits empty queries and fragments extracted. Unless this new flag is set. This also makes the behavior more consistent: without it set, zero length queries and fragments are considered not present in the URL. With the flag set, they are returned as a zero length strings if they were in fact present in the URL. This applies when extracting the individual query and fragment components and for the full URL. Closes #13396
This commit is contained in:
parent
5379dbc248
commit
3eac21d86b
6 changed files with 77 additions and 10 deletions
|
|
@ -99,6 +99,9 @@ typedef enum {
|
|||
#define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */
|
||||
#define CURLU_PUNYCODE (1<<12) /* get the host name in punycode */
|
||||
#define CURLU_PUNY2IDN (1<<13) /* punycode => IDN conversion */
|
||||
#define CURLU_GET_EMPTY (1<<14) /* allow empty queries and fragments
|
||||
when extracting the URL or the
|
||||
components */
|
||||
|
||||
typedef struct Curl_URL CURLU;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue