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

resolving a fragment against any scheme does not succeed #142

Closed
pyfisch opened this issue Nov 21, 2015 · 1 comment
Closed

resolving a fragment against any scheme does not succeed #142

pyfisch opened this issue Nov 21, 2015 · 1 comment

Comments

@pyfisch
Copy link
Contributor

pyfisch commented Nov 21, 2015

These tests fail https://github.com/w3c/web-platform-tests/blob/master/url/urltestdata.txt#L346-L351 because non-relative URLs can't be constructed using a base URL.

@SimonSapin
Copy link
Member

Fixed in #176. The relevant commit will closed this automatically when merged.

rust-url/src/parser.rs

Lines 160 to 161 in 112edbb

if input.starts_with("#") {
self.fragment_only(base_url, input)

SimonSapin added a commit that referenced this issue Apr 12, 2016
This changes the data structure for `Url`:

Rather than having multiple `String` (or `Vec<String>`) components,
this uses a single `String` that contains the serialization of an URL
and some indices into it to access components in O(1) time.

This saves on memory allocations and makes serialization and some other
methods very cheap, as they return `&str` rather than building a new `String`.

As a consequence, most of `src/lib.rs` and `src/parser.rs` had to be rewritten.

Fixes #142.
SimonSapin added a commit that referenced this issue Apr 13, 2016
This changes the data structure for `Url`:

Rather than having multiple `String` (or `Vec<String>`) components,
this uses a single `String` that contains the serialization of an URL
and some indices into it to access components in O(1) time.

This saves on memory allocations and makes serialization and some other
methods very cheap, as they return `&str` rather than building a new `String`.

As a consequence, most of `src/lib.rs` and `src/parser.rs` had to be rewritten.

Fixes #142.
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

No branches or pull requests

2 participants