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

Use opaque host parser for non-special schemes #403

Merged
merged 4 commits into from Oct 31, 2017

Conversation

@valenting
Copy link
Collaborator

valenting commented Oct 25, 2017

Addresses URL spec change:
whatwg/url@3036255

For non-special schemes we use the opaque host parser - meaning the IDNA parser is not used, but instead we apply a UTF-8 percent encode using the simple encode set on the host input.


This change is Reviewable

@SimonSapin
Copy link
Member

SimonSapin commented Oct 27, 2017

Please change the doc-comment of Host::Domain to say that it also includes opaque host names.

Next time we make breaking changes to this crate’s API, would it be useful to have Opaque be a separate variant in the Host enum? Or do users always do the same thing in both cases?


Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@valenting
Copy link
Collaborator Author

valenting commented Oct 31, 2017

The URL spec does list opaque hosts separately from regular hosts, but I don't know if this is useful reasons other than parsing the URL.


Review status: 4 of 5 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@SimonSapin
Copy link
Member

SimonSapin commented Oct 31, 2017

@bors-servo r+


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bors-servo
Copy link
Contributor

bors-servo commented Oct 31, 2017

📌 Commit 8646115 has been approved by SimonSapin

bors-servo added a commit that referenced this pull request Oct 31, 2017
Use opaque host parser for non-special schemes

Addresses URL spec change:
whatwg/url@3036255

For non-special schemes we use the opaque host parser - meaning the IDNA parser is not used, but instead we apply a UTF-8 percent encode using the simple encode set on the host input.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/403)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 31, 2017

Testing commit 8646115 with merge 8e3cbca...

@bors-servo
Copy link
Contributor

bors-servo commented Oct 31, 2017

☀️ Test successful - status-travis
Approved by: SimonSapin
Pushing 8e3cbca to master...

@bors-servo bors-servo merged commit 8646115 into servo:master Oct 31, 2017
4 checks passed
4 checks passed
code-review/reviewable 5 files reviewed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@valenting valenting deleted the valenting:opaque-host-parser branch Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.