Commit graph

30 commits

Author SHA1 Message Date
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
2481ad25f8 Rustfmt net crate 2018-11-03 15:29:01 +01:00
Alan Jeffrey
05391e27cd Add lots of derived Debug impls 2018-10-29 09:21:37 -05:00
Paul Rouget
9fb5795f37 delegate resource reading to embedder 2018-04-27 15:34:52 +08:00
coalman
fc34b9a14d Fix indentation errors in servo rust code that tidy now finds. 2017-04-18 14:56:13 -04:00
Anthony Ramine
fb86bfebf4 Introduce HstsList::switch_known_hsts_host_domain_url_to_https 2017-04-05 14:42:59 +02:00
Anthony Ramine
170bcfc03e Kill hsts::secure_url 2017-04-05 14:42:49 +02:00
Anthony Ramine
fd9cd33892 Use serde_json to persist cookies in the net crate 2017-02-22 12:33:10 +01:00
Raghav
6a14349eb1 Refactor HSTSList to use HashMap
Refactored HSTSList to use HashMap, where the key of HashMap is the base
domain. Every time when we check if a host is secure, we find the base
domain of the host and get a vector of HSTS entries associated with the
base domain.

While this will not give O(1) look up time, we would have a smaller list
to iterate for every lookup. I have added one unit test to validate
HashMap changes.
2016-12-30 22:00:03 +05:30
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Corey Farwell
08fc002f41 Rename 'HSTS*' structures to 'Hsts*'.
"In CamelCase, acronyms count as one word: use Uuid rather than UUID."

-- https://doc.rust-lang.org/style/style/naming/README.html
2016-04-17 14:12:28 -04:00
Corey Farwell
faa3d8724b Refactor Servo HSTS file loading, hard-fail if can't load.
Use constructor pattern instead of separate utility function.

Instead of allowing the Servo HSTS file loading to silently fail, we
should expect that file to always exist and be formatted correctly.
2016-04-17 14:12:07 -04:00
Corey Farwell
d3b8b6472b Move UTF8 bytes handling into generic constructor.
Separate from Servo specific logic.
2016-04-17 12:39:50 -04:00
Corey Farwell
52b3226d54 Rename constructor to match convention, add doc comment. 2016-04-17 12:38:29 -04:00
Corey Farwell
c37ab1facd Make read_resource_file param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
2016-04-16 23:06:59 -04:00
Simon Sapin
45ec900745 Remove dependency on regex_macros
This reduces the amount of code using unstable features that we depend on.
The hand-written IP address parser is probably just as fast.
2015-11-24 22:07:14 +01:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Maciej Skrzypkowski
88815d21ba Add plugins for compositing and net crates #7699
Changed to_string calls to to_owned calls
where was a need.
2015-09-22 13:51:21 +02:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
James Graham
f52276d2cc Use hosts-replaced URL only when loading resources 2015-08-05 10:34:20 +01:00
Sam Gibson
118122da38 Uses the approach suggested by @SimonSapin for changing Url scheme
servo/rust-url#61
2015-07-22 11:49:10 +12:00
Sam Gibson
bae979137a Moves HSTS includeSubdomains enum to net_traits 2015-07-22 11:49:09 +12:00
Sam Gibson
11f5be6d85 Responds to more code review feedback
* Use regex from resource task
* Don't have an option of an HSTS list, default to empty
2015-07-22 11:49:08 +12:00
Sam Gibson
f2148f06b1 Moves the HSTS replacement code to http_loader
This respects STS for redirects as well.
2015-07-22 11:49:08 +12:00
Sam Gibson
826f56bdf3 Moves HSTS code to it's own module 2015-07-22 11:49:07 +12:00