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

Fix authority parsing #39

Merged
merged 2 commits into from Feb 14, 2021
Merged

Conversation

jathd
Copy link
Contributor

@jathd jathd commented Feb 14, 2021

This fixes 2 bugs around the parsing of the authority component:

  1. The authority component can be empty, as in scheme:/path.
  2. There can be an authority without a scheme (in a relative reference URI).

For instance, "//foo/bar" is a well-formed relative reference with authority
"foo" and path "/bar".

The code used to assume that whithout a scheme, we're parsing a relative
reference (this is correct) and thus only a path can follow (this is the part
that is wrong).
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 69.292% when pulling 7c436af on jathd:fix-authority-parsing into d7f2720 on fukamachi:master.

@fukamachi fukamachi merged commit 321a3e3 into fukamachi:master Feb 14, 2021
@fukamachi
Copy link
Owner

Thanks!

@jathd jathd deleted the fix-authority-parsing branch February 15, 2021 06:30
@jathd
Copy link
Contributor Author

jathd commented Feb 15, 2021

By the way, I hadn't noticed but this fixes issues #31 and #38.

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

3 participants