Commit Graph

1036 Commits

Author SHA1 Message Date
Plecra e29fdcfa98 docs: Typo in example (#614) 2020-06-25 14:06:37 +02:00
Nicholas Bishop b35a55ad72 Fix typo in precent-encoding documentation (#611) 2020-06-24 11:17:19 +02:00
bors-servo 80a6945bb9 Auto merge of #607 - jplatte:master, r=SimonSapin
Split form_urlencoded into its own crate

Resolves #605.

I wasn't sure what version to give the new crate, so I went with 1.0.0.
2020-06-19 18:15:51 -04:00
Jonas Platte 55b7e47713 Revert pointless visibility changes 2020-06-20 00:09:09 +02:00
Jonas Platte 2b4f4408a7 Apply review suggestions
* Move decode_utf8_lossy back into query_encoding
* Don't export the query_encoding module, but re-export EncodingOverride
  from it
2020-06-19 23:59:27 +02:00
Jonas Platte 2f301b7173 Split form_urlencoded into its own crate 2020-06-17 00:47:31 +02:00
Valentin Gosu 2db6421807 Fix missing / for non-special URLs (#603)
Fixes #579
2020-06-11 16:10:46 +02:00
DavidKorczynski 8fef9ac9a9 Updated Cargo.toml with new libfuzzer dependency. (#600) 2020-06-09 14:04:30 +02:00
Yoshua Wuyts 335546fbf4 impl TryFrom<'a str> for Url (#569) 2020-03-09 13:07:30 +01:00
bors-servo 6ba4430219 Auto merge of #575 - valenting:version-2.1.1, r=SimonSapin
Update version to 2.1.1

PR #537 fixed a large number of issues which affected compliance
with the URL spec. We should release a new crate version with
these changes.
2020-01-08 07:14:15 -05:00
Valentin Gosu cd229fe6a8 Update version to 2.1.1
PR #537 fixed a large number of issues which affected compliance
with the URL spec. We should release a new crate version with
these changes.
2020-01-08 13:10:01 +01:00
Valentin Gosu 1e8a20bf8c Merge pull request #537 from o0Ignition0o/40_tests_left
Pass "new" tests
2020-01-07 15:53:48 +02:00
o0Ignition0o 05ccc4997b Comments and nits fixups. 2020-01-07 13:56:18 +01:00
Jeremy Lempereur dfc44ad26b Avoid allocation when checking for windows drive letters. 2020-01-07 13:56:18 +01:00
Jeremy Lempereur ab880a79de trim file paths if needed. 2020-01-07 13:56:18 +01:00
o0Ignition0o 72593805f7 Make sure a windows drive letter segment always ends with a slash. 2020-01-07 13:56:18 +01:00
o0Ignition0o 64514f0a3b Pleasing the 1.33.0 borrow checker. 2020-01-07 13:56:18 +01:00
o0Ignition0o 7aeadb8cac removing unused imports. 2020-01-07 13:56:18 +01:00
Jeremy Lempereur 8de66ca541 Fix scheme setter
> test result: FAILED. 650 passed; 63 failed; 0 ignored; 0 measured
2020-01-07 13:56:18 +01:00
Jeremy Lempereur ee55e79cd2 Hash getter and setter. 2020-01-07 13:56:18 +01:00
Jeremy Lempereur bbdc45b5ae Host parsing rules. 2020-01-07 13:56:18 +01:00
Jeremy Lempereur b759256be8 Path and file parsing. 2020-01-07 13:56:18 +01:00
Anthony Ramine 77c0a7abd1 Properly copy hosts of base file:// URLs when needed
> test result: FAILED. 642 passed; 71 failed; 0 ignored; 0 measured
2020-01-07 13:56:18 +01:00
Anthony Ramine 06f6bc5693 Fix a Windows quirk
> test result: FAILED. 640 passed; 73 failed; 0 ignored; 0 measured
2020-01-07 13:56:18 +01:00
Anthony Ramine 199dfbeed3 Refactor parse_file to look more like the spec 2020-01-07 13:56:18 +01:00
Anthony Ramine 78e92758ea Fix percent encoding of fragments (closes #491)
> test result: FAILED. 637 passed; 76 failed; 0 ignored; 0 measured
2020-01-07 13:56:18 +01:00
Anthony Ramine 7bff2b6466 Update tests from wpt
The two json files were taken from
web-platform-tests/wpt@e69af8258d

> test result: FAILED. 624 passed; 89 failed; 0 ignored; 0 measured
2020-01-07 13:56:18 +01:00
Valentin Gosu b662f6f2a5 Merge pull request #573 from servo/msvr
Increment MSVR to 1.36.0
2020-01-07 12:59:47 +02:00
Simon Sapin d975ce7268 Increment MSVR to 1.36.0
… because `unicode-normalization` did.

Fixes https://github.com/servo/rust-url/issues/566
Closes https://github.com/servo/rust-url/pull/572
2020-01-03 00:07:52 +01:00
bors-servo 4a33d07197 Auto merge of #536 - benesch:upgrade-20, r=SimonSapin
Add an upgrade guide for v2.0.

Extracted from #534, with review feedback addressed. This variant omits the changelogs in an effort to introduce less of a maintenance burden.

Fix #532.

<!-- 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/536)
<!-- Reviewable:end -->
2019-09-02 10:21:03 -04:00
Simon Sapin 241608c126 Spaces instead of tabs 2019-09-02 16:20:34 +02:00
Nikhil Benesch 94ed4cd6ca Add an upgrade guide for v2.0.
Fix #532.

Co-Authored-By: Jeremy Lempereur <jeremy.lempereur@gmail.com>
2019-09-02 09:53:11 -04:00
bors-servo a6aec2e519 Auto merge of #528 - DoumanAsh:ascii_set_remove, r=SimonSapin
percent-encoding: Allow to remove character from AsciiSet

Allow to remove character from AsciiSet

I liked trait approach better, but if you're going with something like AsciiSet it would be better to allow to remove bytes, as sometimes it is easier to take `NON_ALPHANUMERIC` and remove few necessary characters

<!-- 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/528)
<!-- Reviewable:end -->
2019-08-05 10:59:34 -04:00
bors-servo a93cc7c862 Auto merge of #535 - servo:socket_addrs, r=nox
Restore DNS resolution functionality from url 1.x

This is an alternative to https://github.com/servo/rust-url/pull/533.

I feel that an inherent method is more appropriate than an impl of the `ToSocketAddrs` trait: it is not the URL as a whole that is converted, only parts of it.

<!-- 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/535)
<!-- Reviewable:end -->
2019-08-05 10:55:30 -04:00
Simon Sapin 00b467c074 Add Url::socket_addrs 2019-07-31 15:30:38 +02:00
Simon Sapin f7537c3703 fmt 2019-07-31 14:11:49 +02:00
Douman d2ddab3d34 Remove pub access to contains method 2019-07-24 13:39:26 +02:00
Douman 1e42f286f3 percent-encoding: bump to 2.1.0 2019-07-24 10:56:40 +02:00
Douman 533cb64d86 Expose AsciiSet::contains 2019-07-24 07:21:32 +02:00
Douman d4e9d6fe73 percent-encoding: Allow to remove character from AsciiSet 2019-07-24 07:13:03 +02:00
bors-servo b95fdd9c79 Auto merge of #525 - dekellum:future-proof, r=SimonSapin
Add unused variants to ParseError and SyntaxViolation enums

Per discussion in https://github.com/servo/rust-url/issues/498#issuecomment-513299432 , this adds a hidden unused variant to each of `ParseError` and `SyntaxViolation` enums so as to make future additions non-breaking changes.   This is the long standing manual way (e.g. originally used by`std::io::ErrorKind`), given lack of a stable feature and acceptable rust MSRV with rust-lang/rust#44109.

Also these types already implemented `Display` but having been burnt with `Debug` vs `Display` versions of the `fmt` function, I also disambiguated paths in these `Display` implementations.

<!-- 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/525)
<!-- Reviewable:end -->
2019-07-23 08:48:19 -04:00
bors-servo c563c1b55b Auto merge of #526 - dekellum:fix-redundant-field-names-lint, r=SimonSapin
Remove redundant field names in struct init

Besides the obvious minimization, these changes avoid lints of the following form from clippy:

``` txt
    warning: redundant field names in struct initialization
      --> src/form_urlencoded.rs:30:13
       |
    30 |     Parse { input: input }
       |             ^^^^^^^^^^^^ help: replace it with: `input`
       |
       = help: for further information visit
    https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
```

<!-- 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/526)
<!-- Reviewable:end -->
2019-07-23 08:34:40 -04:00
David Kellum a4ac3bb336 Remove redundant field names in struct init
Besides the obvious minimization, these changes avoid lints of the
following form from clippy:

    warning: redundant field names in struct initialization
      --> src/form_urlencoded.rs:30:13
       |
    30 |     Parse { input: input }
       |             ^^^^^^^^^^^^ help: replace it with: `input`
       |
       = help: for further information visit
    https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
2019-07-22 11:01:06 -07:00
David Kellum 8295306a26 Disambiguate Display::fmt calls for error types 2019-07-22 10:32:13 -07:00
David Kellum 7f0c899fac Add FutureProof variants to ParseError and SyntaxViolation 2019-07-22 10:32:13 -07:00
bors-servo dcde69ef1e Auto merge of #521 - servo:serde, r=SimonSapin
Some serde improvements

<!-- 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/521)
<!-- Reviewable:end -->
2019-07-19 12:24:39 -04:00
Anthony Ramine ba7e68447d Optimise default string deserialization for Url 2019-07-19 10:26:25 +02:00
Anthony Ramine 86bc93bc0a Derive serde traits for Host and HostInternal 2019-07-19 10:26:18 +02:00
Anthony Ramine 4b55d21eee Make HostInternal private 2019-07-19 10:11:11 +02:00
bors-servo 2aa4915de6 Auto merge of #518 - est31:idna_serde, r=nox
Move tests of idna to serde-json

Part of #506

<!-- 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/518)
<!-- Reviewable:end -->
2019-07-18 05:31:26 -04:00