urlapi: stop extracting hostname from file:// URLs on Windows

There is no reason we should treat this part different on Windows. Noe
anything except blank, localhost or 127.0.0.1 cause error there as well.

Also: fix query handling in urlencode_str

Closes #21296
This commit is contained in:
Daniel Stenberg 2026-04-13 14:55:16 +02:00
parent 0b4ebebb06
commit 9ceb3ff46a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 60 additions and 89 deletions

View file

@ -49,6 +49,10 @@ struct Curl_URL {
#define HOST_IPV4 2
#define HOST_IPV6 3
#define QUERY_NO 2
#define QUERY_NOT_YET 3 /* allow to change to query */
#define QUERY_YES 4
size_t Curl_is_absolute_url(const char *url, char *buf, size_t buflen,
bool guess_scheme);