Commit graph

87 commits

Author SHA1 Message Date
James Graham
f52276d2cc Use hosts-replaced URL only when loading resources 2015-08-05 10:34:20 +01: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
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
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
bors-servo
db2eb36e19 Auto merge of #6325 - Ms2ger:from_str, r=nox
The former appears to be preferred.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6325)
<!-- Reviewable:end -->
2015-06-14 03:55:56 -06:00
Ms2ger
b49bd79625 Use str::parse() rather than FromStr::from_str.
The former appears to be preferred.
2015-06-13 17:58:16 +02:00
Eduard Burtescu
9a87f830fc Preserve UserAgent header on redirect. 2015-06-12 21:44:22 +03:00
bors-servo
be6c251e4c Auto merge of #6171 - eleweek:fix-4184-ok, r=Manishearth
I tried fixing #4184 , here is the code I have right now. 

I haven't tested it, because I don't know what is the best way to test this part of code. Would like some help with testing this. Should I write an autotest or should I just test manually?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6171)
<!-- Reviewable:end -->
2015-05-25 23:10:18 -05:00
Alexander Putilin
f5a0285833 Fix issues with PR #6171 2015-05-26 01:04:05 +03:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Alexander Putilin
e840698d4a fixes 4184: no-sniff and check-for-apache-bug for mime sniffing 2015-05-24 04:02:34 +03:00
Himaja
9f4a88bc48 Initial changes for devtools support for logging HTTP requests.
Add a NetworkEventActor to devtools/actors/

Authors:
Ashritha Mohan Ram <amohanr@ncsu.edu>
Himaja Valavala <hsvalava@ncsu.edu>
Anand Chandrasekar <achandr9@ncsu.edu>
Yiyang Wang <ywang95@ncsu.edu>
2015-05-05 11:49:26 -04:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Marcus Klaas
c1f25bbfe4 Replace usage of ResponseSenders by LoadConsumer 2015-04-19 13:26:56 +02:00
Josh Matthews
7b3043a59b Warning fixes. 2015-04-16 11:46:42 -04:00
Josh Matthews
1b9684634f Document async networking interfaces. 2015-04-16 11:46:41 -04:00
Josh Matthews
7517aac9e9 Completely abstract sending responses over channels vs. listeners. 2015-04-16 11:46:39 -04:00
Josh Matthews
1644436557 Start switching net/ to use abstractions over channels to allow introducing non-channel communication in the future. 2015-04-16 11:46:39 -04:00
Bogdan Cuza
ce4b8a0af7 Reduce duplication 2015-04-14 22:03:22 +03:00
Bogdan Cuza
19ffab82f1 Make Metadata use ContentType 2015-04-14 22:03:21 +03:00
Simon Sapin
e27c967f81 Move net::resource_task unit tests into the unit_tests crate. 2015-04-08 01:07:51 +02:00
Josh Matthews
a3201bc1ac Enable optional mime sniffing, and integrate it with the file loader. 2015-04-06 20:19:30 -04:00
Josh Matthews
2d730f2ae9 Remove the sniffer task. 2015-04-06 19:31:53 -04:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00
Ms2ger
578a909864 Stop using old_io in net tests. 2015-03-26 17:43:13 +01:00
Ms2ger
9aa2696641 Stop using old_path in net. 2015-03-26 08:59:33 +01:00
Ms2ger
ba87666cdb Update some code that's feature-gated under core. 2015-03-21 18:44:39 +01:00