-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Allow empty authority for unknown schemes #4349
Allow empty authority for unknown schemes #4349
Conversation
for use with unknown schemes (i.e. not "file:///") to override cURL's demand that an authority exists.
parts should fail. With it, it should work. The flag effectively disables the hostname check if it's set, and the hostname is empty.
I've got to run - if there are tests failing, or there should be changes, I'll look at them in a few days, probably. Locally everything looked fine. And obviously if you'd like changes, I'm happy to provide them. |
I think this is a sensible way to make the parser handle such URLs so I'm in favor of merging once things are green. Still missing: documentation of the new flag and |
Makes sense - will probably get to those changes tomorrow. |
The two builds using boringssl fail due to other reasons, not your fault! |
Excellent, then let me know if you want any other changes, otherwise I'm done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge asap!
Thanks! |
No worries, glad to be of help! |
I discussed this briefly with @bagder
According to RFC3986 Section 3.2.2 on page 21
cURL implements this behaviour for the
file
scheme, but doesn't - and cannot - implement this behaviour for schemes it does not know. For such schemes, passing a new flag that permits empty authority sections is desirable.This PR adds such a
CURLU_NO_AUTHORITY
flag, as well as test cases.