urlapi: improved return codes

- add CURLUE_BACKSLASH that can be returned when a backslash was used
  where a forward one probably was intended.

- make CURLUE_NO_HOST higher priority than port number errors for URLs
  without hostname. Like in "http://::1"

- shortened some URL parser error strings

Extend test 1560 to verify.

Reported-by: kit-ty-kate on github
Fixes #22337
Closes #22408
This commit is contained in:
Daniel Stenberg 2026-07-27 16:05:38 +02:00
parent c7328740ec
commit 573a6ec16b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 54 additions and 27 deletions

View file

@ -64,6 +64,7 @@ typedef enum {
CURLUE_BAD_USER, /* 29 */
CURLUE_LACKS_IDN, /* 30 */
CURLUE_TOO_LARGE, /* 31 */
CURLUE_BACKSLASH, /* 32 */
CURLUE_LAST
} CURLUcode;