diff --git a/docs/libcurl/curl_url_get.md b/docs/libcurl/curl_url_get.md index 100eea7f52..54041180fa 100644 --- a/docs/libcurl/curl_url_get.md +++ b/docs/libcurl/curl_url_get.md @@ -129,12 +129,15 @@ nothing following the hash sign. ## CURLUPART_URL -When asked to return the full URL, curl_url_get(3) returns a normalized -and possibly cleaned up version using all available URL parts. +When asked to return the full URL, curl_url_get(3) returns a normalized and +possibly cleaned up version using all available URL parts. -We advise using the *CURLU_PUNYCODE* option to get the URL as "normalized" -as possible since IDN allows hostnames to be written in many different ways -that still end up the same punycode version. +We advise using the *CURLU_PUNYCODE* option to get the URL as "normalized" as +possible since IDN allows hostnames to be written in many different ways that +still end up the same punycode version. + +Zero-length queries and fragments are excluded from the URL unless +CURLU_GET_EMPTY is set. ## CURLUPART_SCHEME @@ -181,7 +184,8 @@ The initial question mark that denotes the beginning of the query part is a delimiter only. It is not part of the query contents. A not-present query returns *part* set to NULL. -A zero-length query returns *part* as a zero-length string. + +A zero-length query returns *part* as NULL unless CURLU_GET_EMPTY is set. The query part gets pluses converted to space when asked to URL decode on get with the CURLU_URLDECODE bit. @@ -191,6 +195,10 @@ with the CURLU_URLDECODE bit. The initial hash sign that denotes the beginning of the fragment is a delimiter only. It is not part of the fragment contents. +A not-present fragment returns *part* set to NULL. + +A zero-length fragment returns *part* as NULL unless CURLU_GET_EMPTY is set. + # EXAMPLE ~~~c