]> git.ipfire.org Git - thirdparty/curl.git/commit
urlapi: provide more detailed return codes 8049/head
authorDaniel Stenberg <daniel@haxx.se>
Tue, 23 Nov 2021 16:07:31 +0000 (17:07 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Nov 2021 07:36:04 +0000 (08:36 +0100)
commit4183b8fe9a8558b8f62c9dbf8271deed75bff28b
treeff0f2afe3911c290897b7f37c8def931ae3f2c2d
parenta5f5687368a5f95415d58d37e8dfb10c6b6d44c5
urlapi: provide more detailed return codes

Previously, the return code CURLUE_MALFORMED_INPUT was used for almost
30 different URL format violations. This made it hard for users to
understand why a particular URL was not acceptable. Since the API cannot
point out a specific position within the URL for the problem, this now
instead introduces a number of additional and more fine-grained error
codes to allow the API to return more exactly in what "part" or section
of the URL a problem was detected.

Also bug-fixes curl_url_get() with CURLUPART_ZONEID, which previously
returned CURLUE_OK even if no zoneid existed.

Test cases in 1560 have been adjusted and extended. Tests 1538 and 1559
have been updated.

Updated libcurl-errors.3 and curl_url_strerror() accordingly.

Closes #8049
docs/libcurl/libcurl-errors.3
docs/libcurl/symbols-in-versions
include/curl/urlapi.h
lib/strerror.c
lib/urlapi.c
tests/data/test1538
tests/data/test1559
tests/libtest/lib1560.c