]> git.ipfire.org Git - thirdparty/curl.git/commit
urlapi: add CURLU_GET_EMPTY for empty queries and fragments
authorDaniel Stenberg <daniel@haxx.se>
Wed, 17 Apr 2024 09:39:25 +0000 (11:39 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 18 Apr 2024 08:37:28 +0000 (10:37 +0200)
commit3eac21d86bc50ba459a9a8a0f3d1130b6d30b57d
tree4f3a4bc38b7e08e51684181cfa148749f23b91ea
parent5379dbc248045ba46e89d76ffc4be4380d854728
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
docs/libcurl/curl_url_get.md
docs/libcurl/symbols-in-versions
include/curl/urlapi.h
lib/urlapi.c
tests/data/test1201
tests/libtest/lib1560.c