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

Percent-encode tilde in application/x-www-form-urlencoded #100

Merged
merged 1 commit into from May 1, 2015

Conversation

@nox
Copy link
Member

nox commented May 1, 2015

No description provided.

@SimonSapin
Copy link
Member

SimonSapin commented May 1, 2015

Why this change? It is against spec: https://url.spec.whatwg.org/#percent-encoded-bytes

@Manishearth
Copy link
Member

Manishearth commented May 1, 2015

@SimonSapin
Copy link
Member

SimonSapin commented May 1, 2015

Looks like I completely misread the patch, sorry! Yes indeed, FORM_URLENCODED_ENCODE_SET is only used for the application/x-www-form-urlencoded serializer.

SimonSapin added a commit that referenced this pull request May 1, 2015
Percent-encode tilde in application/x-www-form-urlencoded
@SimonSapin SimonSapin merged commit 9ab6d5e into servo:master May 1, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@SimonSapin
Copy link
Member

SimonSapin commented May 1, 2015

Let me know if you need this on crates.io and/or a backport to an earlier Rust version for Servo.

@Manishearth
Copy link
Member

Manishearth commented May 1, 2015

Hopefully the Servo rustup will land soon.

@nox
Copy link
Member Author

nox commented May 1, 2015

If not a backport (that would be cool), at least I would want someone to explain to me how the fuck do I override rust-url with my own while still enabling the feature "query_encoding". =)

@SimonSapin
Copy link
Member

SimonSapin commented May 4, 2015

Ok, I published version 0.2.32 on crates.io.

To override, create a .cargo/config file (e.g. at the root of the servo repository, it’s is .gitignored) that contains paths = ["../path/to/rust-url"].

To enable query_encoding, have this in the Cargo.toml file of the crate where you want to use it:

[dependencies.url]
version = "0.2.32"
features = ["query_encoding"]

(And remove the previous entry for rust-url, something like url = "0.2" in the [dependencies] section.)

The two really should be orthogonal. If enabling features doesn’t work with overrides, that may be a bug in Cargo.

@nox
Copy link
Member Author

nox commented May 4, 2015

I reported it upstream: rust-lang/cargo#1571.

@SimonSapin
Copy link
Member

SimonSapin commented May 4, 2015

.cargo/config is not the place where you specify features (Cargo.toml of the dependent is). It only specifies where to find source code.

Have you tried what I explained above?

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.