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

tool: adjust handling of non-existent url scheme #9576

Closed
wants to merge 1 commit into from

Conversation

monnerat
Copy link
Contributor

The test for a non-existent protocol scheme in an URL is currently always false and the warning message can never occur. Fortunately this has no impact as this test is now unconditionally excluded.
This commit fixes it however, in case this warning is reenabled.

A debug assertion is also added to verify protocols included/excluded in a set are always tokenized.

Follow-up to commit 677266c.

Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this improves the code. I think we should rather remove the #if 0 section that checks use_proto and leave the "???" handling in the url_proto function as it is.

@monnerat
Copy link
Contributor Author

I think we should rather remove the #if 0 section that checks use_proto

I agree. There is very little chance to have the warning reenabled anyway since it's redundant with the later error returned by curl_easy_perform().

I'll update this PR for that.

Add a debug assertion to verify protocols included/excluded in a set
are always tokenized.

Follow-up to commit 677266c.
@bagder
Copy link
Member

bagder commented Sep 23, 2022

Thanks!

@bagder bagder closed this in ce30d51 Sep 23, 2022
@monnerat monnerat deleted the badurlscheme branch September 23, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants