Commit graph

228 commits

Author SHA1 Message Date
Sara Tang
8c39e968cd Fixed mismatched type error 2015-08-24 23:11:31 -04:00
Sara Tang
f80ae3402a Fixes for issue #7347 2015-08-24 21:32:16 -04:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
bors-servo
0d6d6a0500 Auto merge of #7257 - jxs:master, r=Ms2ger
Replace uses of `for foo in bar.iter()`,

and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7257)
<!-- Reviewable:end -->
2015-08-18 02:46:46 -06:00
Glenn Watson
6d9fccbae7 Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA). 2015-08-18 14:42:28 +10:00
João Oliveira
067a22a868 Replace uses of for foo in bar.iter(),
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
2015-08-18 01:46:11 +01:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
João Oliveira
0038580abf Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()
closes #7197
2015-08-15 02:27:39 +01:00
João Oliveira
9c11781880 replace .len() == 0 with is_empty()
closes #7198
2015-08-14 04:00:33 +01:00
wilmoz
210e068ac7 Remove Message suffix from NetworkEventMessage 2015-08-10 18:48:53 -05:00
Adrián Arroyo Calle
af21c2457e MIME classifier should use &[T] instead of &Vec<T> 2015-08-10 15:00:35 +02:00
Connor Imes
b526214a3d Move net_error_list from net to net_traits. Fixes #7050. 2015-08-06 16:37:08 -05:00
James Graham
f52276d2cc Use hosts-replaced URL only when loading resources 2015-08-05 10:34:20 +01:00
Sam Gibson
0d94ee917d Ensure STS headers are only honoured when they come from an HTTPS host 2015-08-02 21:18:24 +12:00
Sam Gibson
c44579018a Obey Strict-Transport-Security header 2015-08-02 21:17:58 +12:00
Patrick Walton
024c4df912 script: Fix merge fallout. 2015-07-31 11:28:09 -07:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
44d13f7fd4 net: Use a thread for each AsyncResponseTarget to avoid having to send
trait objects across process boundaries.
2015-07-31 11:27:49 -07:00
Patrick Walton
9c9d7dc93b net: Make most of the resource task messages serializable. 2015-07-31 11:27:49 -07:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Patrick Walton
82b53d83ff script: Make the ImageCacheTask use IPC.
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.
2015-07-26 23:07:44 -07:00
Patrick Walton
43cb7d5abd net: Convert the storage task to use IPC. 2015-07-26 17:07:17 -07: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
5014da42fc Only secure URL's that aren't already to HTTPS.
Cuts down on logger spam, and unnecessary Url::clone's
2015-07-22 11:49:09 +12:00
Sam Gibson
bae979137a Moves HSTS includeSubdomains enum to net_traits 2015-07-22 11:49:09 +12:00
Sam Gibson
82cafc4274 Passes an Arc<Mutex<HSTSList>> to threads instead of cloning 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
Sam Gibson
02bd5cdc1b Resolves remaining code review issues
* Don't pass a boolean to the HSTSEntry constructor, use an enum instead
* Don't clone when securing load data
* Comment about the Url bug
* Change remaining assert!(... == ...) to assert_eq!(..., ...)
2015-07-22 11:49:07 +12:00
Sam Gibson
29a34dbdb5 Resolves code review comments
* Lots of rust-isms
* Mutable iterator for modifying entries (much better)
2015-07-22 11:49:06 +12:00
Sam Gibson
a068a80619 Don't unnecessarily clone strings 2015-07-22 11:49:06 +12:00
Sam Gibson
8a401d5a7f Re-parse URL to not have inconsistent state 2015-07-22 11:49:05 +12:00
Sam Gibson
795454fb81 Adds control message for HSTS headers 2015-07-22 11:49:04 +12:00
Sam Gibson
f284181781 Abstract out ResourceManager messaging from impl
De-coupling makes testing a bit easier.
2015-07-22 11:49:04 +12:00
Sam Gibson
ff1777e446 Evict HSTS entries when a max-age of 0 is seen 2015-07-22 11:49:03 +12:00
Sam Gibson
690ac636eb Rename/refactor 2015-07-22 11:49:03 +12:00
Sam Gibson
15c90a58b2 Expire HSTS entries that have exceeded their max-age
servo/servo#6105
2015-07-22 11:49:03 +12:00
Sam Gibson
8d39fb6dcf Shift checking for IP address host for HSTS entry to constructor
servo/servo#6105
2015-07-22 11:48:05 +12:00
Sam Gibson
cb9b0c2a7a Add max-age to HSTS entries
Refactors API for pushing new entries on, and adds a max age. This does
not add a check for the max-age, or remove old entries from the list.
Instead this just adds the data-field.

servo/servo#6105
2015-07-22 11:48:05 +12:00
Sam Gibson
72d4433587 Do not allow IP address in HSTS list
As per [rfc6797](https://tools.ietf.org/html/rfc6797#section-8.1.1), do
not allow IPv4 or IPv6 addresses as host entries into the HSTS list.

servo/servo#6105
2015-07-22 11:48:04 +12:00
Sam Gibson
d2f35555b9 Implement mutable HSTS list
This prepares the resource task to update the HSTS list when it sees STS
headers. This will allow full HSTS support for servo/servo#6105 when the
resource task implements the header checking
2015-07-22 11:48:03 +12:00
Sam Gibson
aa19a9a741 Preload an HSTS domain list from chromium
This resolves the first part of servo/servo#6105. The remaining part is
to update the list based on the STS headers from the server.
2015-07-22 11:48:03 +12:00
Bogdan Cuza
0baa6b477c Replace astersisks with appropriate versions in deps 2015-07-20 20:08:08 +03:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
Simon Sapin
83d2a11d86 Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) 2015-07-15 00:46:43 +02:00
Ms2ger
28086f3c75 Use Box::into_raw rather than boxed::into_raw.
The latter is deprecated.
2015-06-25 23:03:54 +02:00
Ms2ger
73a7e92bfd Update to rustc 2d0cbf3e3e25e092bd9e4c94d08e446b680869f0. 2015-06-25 20:02:36 +02:00
Pyfisch
468faf9d43 Remove is_some() from mime_classifier.rs and fix typo "uknown" -> "unknown" 2015-06-23 22:46:22 +02:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00