Sam Gibson
ea2d7f4dd5
Uses the correct url when reporting http errors
2015-08-30 12:14:03 +10:00
Sam Gibson
d6e1fab278
Uses hyper's ContentEncoding instead of get_raw
2015-08-30 12:14:03 +10:00
Sam Gibson
5a60fdf4ca
Moves STS update code to a function
2015-08-30 12:14:02 +10:00
Sam Gibson
c093ce8a5a
Only use the resource manager's HSTS list.
...
Simplifies a bunch of stuff.
2015-08-30 12:14:02 +10:00
Sam Gibson
ffc3877deb
Adds tests for setting/getting cookies from load
2015-08-30 12:13:35 +10:00
Sam Gibson
26a6e058e7
Adds more tests for checking request headers
2015-08-30 12:13:34 +10:00
Sam Gibson
7a09c2d924
Shifts to a series of traits/associated types instead of having a requester
2015-08-30 12:13:34 +10:00
Sam Gibson
06f09f6cdb
Adds tests for redirecting
...
servo/servo#6727
2015-08-30 12:13:34 +10:00
Sam Gibson
81fe5938bf
Removes HttpRequest, adds HttpResponse wrapper
...
The HttpRequest trait doesn't make sense, on further reflection. Rather,
just modify the method signature on the requester. The hyper request was
only being used to mutate it's headers anyway.
servo/servo#6727
2015-08-30 12:13:33 +10:00
Sam Gibson
7633cd54c2
Abstract everything but the response from hyper
...
Because we're using unsized types not for requesting, there's not a
satisfactory way of doing this without boxing the request...
Once unsized stuff lands in rust 1.2/1.3(???) then this should be
implemented with Rc's instead of Box's.
For the time being I'm not sure what else to do.
servo/servo#6727
2015-08-30 12:13:33 +10:00
Sam Gibson
6cba33a50b
Abstracts the hyper connection to a servo HttpRequester trait
...
servo/servo#6727
2015-08-30 12:13:32 +10:00
Sam Gibson
67aa11323b
Adds simple POC unit test for load
...
servo/servo#6727
2015-08-30 12:13:32 +10:00
Sam Gibson
9ac250c62c
Abstracts out initial client connection and SSL errors (which I don't think are working?)
...
servo/servo#6727
2015-08-30 12:13:31 +10:00
Sam Gibson
c8c36f4490
Injects the network connector as a dependency into http_loader::load
...
servo/servo#6727
2015-08-30 12:13:30 +10:00
Sam Gibson
610ef40105
Refactors http_loader::load to be synchronous w/ an async wrapper
...
This simplifies the arguments that are passed in and should make testing
errors/responses easier once they're mocked
servo/servo#6727
2015-08-30 12:13:29 +10:00
Josh Matthews
2360db68b1
Improve debuggability of http_loader panics.
2015-08-28 15:11:30 -04:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08: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
wilmoz
210e068ac7
Remove Message suffix from NetworkEventMessage
2015-08-10 18:48:53 -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
2aa5174246
script: Make the resource task communication use IPC channels.
2015-07-31 11:28:09 -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
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
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
Simon Sapin
83d2a11d86
Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)
2015-07-15 00:46:43 +02:00
Eduard Burtescu
00e8e5f77d
Use the correct log crate and setup env_logger in main.
2015-06-06 23:20:40 +03:00
Manish Goregaokar
f80f99fe1e
Move to latest hyper everywhere
2015-06-02 20:12:14 +05:30
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
Simon Sapin
8292f5749e
Upgrade to Hyper 0.4.0
2015-05-12 16:48:21 +02:00
Himaja
01eb31ae8a
1. Add an Option<Pipeline_id> field to the LoadData struct, and a corresponding parameter to LoadData::new()
...
2. Change addEvent in the NetworkEventActor to add_request and add_response
2015-05-05 12:31:40 -04:00
Himaja
6e91ebb1fe
1. Add an enum type NetworkEventMessage for handling both HttpRequest and HttpResponse messages
...
2. Change run_server to handle network events
3. Add a unique id to track request-actor associations
4. Update the network event actor
2015-05-05 11:50:00 -04: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
Glenn Watson
786e24bde0
Handle gzip decompression failure (encountered during jquery test suite work) without panic.
2015-04-30 10:10:21 +10:00
bors-servo
21c38d0de8
Auto merge of #5424 - bdero:bdero/accept-header, r=jdm
...
The value of the header is: `text/html;q=0.9,*/*;q=0.8`
Closes #5399
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5424 )
<!-- Reviewable:end -->
2015-04-26 22:13:30 -05:00
Brandon DeRosier
0a7a853a01
Add Accept header to HTTP loader
...
The value of the header is the same as that of Firefox 35.0.1:
`text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8`
Closes #5399
2015-04-26 22:39:23 -04:00
Ms2ger
9185c3de79
Remove as_mut_slice() calls.
2015-04-26 11:09:03 +02:00
Marcus Klaas
c1f25bbfe4
Replace usage of ResponseSenders by LoadConsumer
2015-04-19 13:26:56 +02: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
Corey Farwell
5eaa922045
Update WHATWG links to use HTTPS
...
Extracted this out of #5649
This commit was created with the following commands:
```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Josh Matthews
1757afef27
Remove int_uint from net.
2015-04-07 16:13:37 -04:00
Josh Matthews
23ae940abf
Enable MIME sniffing for HTTP loads.
2015-04-07 13:25:15 -04: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