]> git.ipfire.org Git - thirdparty/curl.git/commit
urlapi: add CURLU_NO_GUESS_SCHEME
authorDaniel Stenberg <daniel@haxx.se>
Sat, 1 Jun 2024 10:03:34 +0000 (12:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 1 Jun 2024 21:51:42 +0000 (23:51 +0200)
commit655d44d139489625e77cf6790d3622f610c2aab9
treec4d0b06e58440fa68e9050753513549bc37034f9
parent80aa5195458869aa42040bef0c7f38be6846b470
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
docs/libcurl/curl_url_get.md
docs/libcurl/symbols-in-versions
include/curl/urlapi.h
lib/urlapi.c
tests/libtest/lib1560.c