Repository navigation
urlapi: provide more detailed return codes - #8049
Merged
Merged
Conversation
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
bagder
force-pushed
the
bagder/urlapi-returncodes
branch
from
November 25, 2021 07:36
1dd868f to
4183b8f
Compare
1 task done
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jun 6, 2026
Detected by GitHub Code Quality Ref: acd82c8 curl#11006 Ref: 4183b8f curl#8049
vszakats
added a commit
that referenced
this pull request
Jun 7, 2026
dkarpov1970
pushed a commit
to dkarpov1970/curl
that referenced
this pull request
Jun 9, 2026
Detected by GitHub Code Quality Follow-up to acd82c8 curl#11006 Follow-up to 4183b8f curl#8049 Closes curl#21879
dkarpov1970
pushed a commit
to dkarpov1970/curl
that referenced
this pull request
Jun 10, 2026
Detected by GitHub Code Quality Follow-up to acd82c8 curl#11006 Follow-up to 4183b8f curl#8049 Closes curl#21879
This was referenced Aug 30, 2026
This was referenced Sep 27, 2026
6 tasks
This was referenced Oct 12, 2026
This was referenced Oct 20, 2026
This was referenced Oct 27, 2026
This was referenced Nov 3, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.