-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
curl_url_set with CURLUPART_URL with URL already set rejects empty string #17188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Why should it be considered that? |
RFC 3986 4.2. Relative Reference considers an empty string a relative reference:
and the resolution algorithm (section 5.2) handles it thus:
This is also in line with the WHATWG URL spec and the behavior of web browsers when encountering |
Strong arguments, I agree. |
bagder
added a commit
that referenced
this issue
Apr 25, 2025
If the CURLU handle already holds a proper URL, otherwise it is an error. Verified by test 1560 Fixes #17188 Reported-by: zopsicle on github Closes #
nbaws
pushed a commit
to nbaws/curl
that referenced
this issue
Apr 26, 2025
If the CURLU handle already holds a proper URL, otherwise it is an error. Verified by test 1560 Fixes curl#17188 Reported-by: zopsicle on github Closes curl#17189
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
I expected the following
As per the documentation for
curl_url_set
:An empty string should be considered a relative URL which, when made absolute given another URL, leaves that URL untouched.
Instead,
curl_url_set
returnsCURLUE_MALFORMED_INPUT
.curl/libcurl version
operating system
The text was updated successfully, but these errors were encountered: