Skip to content
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

Make curl_url_set(url, CURLUPART_URL, NULL, 0) clear all parts #9028

Closed
wants to merge 1 commit into from

Conversation

adoy
Copy link
Contributor

@adoy adoy commented Jun 19, 2022

As per the documentation :

Setting a part to a NULL pointer will effectively remove that
part's contents from the CURLU handle.

But currently clearing CURLUPART_URL does nothing and returns
CURLUE_OK. This change will clear all parts of the URL at once.

Copy link
Member

@bagder bagder left a comment

Bonus points for the test!

lib/urlapi.c Outdated Show resolved Hide resolved
As per the documentation :

> Setting a part to a NULL pointer will effectively remove that
> part's contents from the CURLU handle.

But currently clearing CURLUPART_URL does nothing and returns
CURLUE_OK. This change will clear all parts of the URL at once.
bagder
bagder approved these changes Jun 19, 2022
@bagder
Copy link
Member

@bagder bagder commented Jun 20, 2022

Thanks!

@bagder bagder closed this in 4bf2c23 Jun 20, 2022
@adoy adoy deleted the clear-url branch Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants