mirror of
https://github.com/curl/curl.git
synced 2025-03-31 16:00:35 +08:00
curl_url_get.md: clarify queries and fragments and CURLU_GET_EMPTY
Follow-up to 3eac21d86bc5 Closes #13407
This commit is contained in:
parent
3e16c97fe9
commit
229c144fe8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user