Commit graph

214 commits

Author SHA1 Message Date
bors-servo
e107f112d8 Auto merge of #7633 - aidanhs:aphs-remove-sslprovider, r=jdm
Remove SslProvider, fixes #7627



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7633)
<!-- Reviewable:end -->
2015-09-14 14:57:55 -06:00
Aidan Hobson Sayers
7632e89a04 Remove unsupported SslProvider, fixes #7627 2015-09-14 21:30:05 +01:00
João Oliveira
813cdaa012 Move setting UserAgent header into http_loader::load,
closes #7541
2015-09-14 15:35:34 +01:00
Eli Friedman
94dec69247 Fix up some unnecessary uses of unsafe. 2015-09-02 15:50:17 -07:00
Sean McArthur
a1a9db8ffd net: use connection pooling 2015-09-02 12:46:53 -04:00
Prabhjyot Singh Sodhi
afcda46cbe Removing unnecessary url clones 2015-09-01 13:44:54 +05:30
Prabhjyot Singh Sodhi
849ee8fbdf removing unnecessary clones 2015-09-01 08:38:42 +05:30
Sam Gibson
43e0c4ac89 Prevents unwrapping invalid location url domains 2015-08-31 13:47:35 +12:00
Sam Gibson
9d0f418ee0 Resolves merge conflict without wonky cloning 2015-08-31 08:54:12 +12:00
Sam Gibson
4b6f07cbe6 Resolves strange borrow/type checking issues from new thread naming 2015-08-30 12:23:50 +10:00
Sam Gibson
f257b5fcef Adds content-length to empty-bodied non-GET/HEAD requests 2015-08-30 12:14:15 +10:00
Sam Gibson
667b563f2e Renames LoadResponse 2015-08-30 12:14:13 +10:00
Sam Gibson
a1fd235347 Moves devtools request msg logic to where the request is sent 2015-08-30 12:14:12 +10:00
Sam Gibson
3b8bada5a1 Fixes code review nits 2015-08-30 12:14:12 +10:00
Sam Gibson
04c012dfbf Binds name instead of inlining value for readability 2015-08-30 12:14:11 +10:00
Sam Gibson
918f8a7760 Removes unnecessary clone 2015-08-30 12:14:11 +10:00
Sam Gibson
d8acb893de Inverts conditional and returns 2015-08-30 12:14:11 +10:00
Sam Gibson
1811ffa178 Uses and_then instead of more complicated matching 2015-08-30 12:14:10 +10:00
Sam Gibson
84ae53e011 Indents arguments to be more readable 2015-08-30 12:14:10 +10:00
Sam Gibson
6de61301f4 Removes inline'ing 2015-08-30 12:14:09 +10:00
Sam Gibson
94284fc47f Fixes new tidy problems 2015-08-30 12:14:09 +10:00
Sam Gibson
d53af0d9ed Fixes merge errors 2015-08-30 12:14:08 +10:00
Sam Gibson
9322954f15 Moves devtools messaging to functions 2015-08-30 12:14:06 +10:00
Sam Gibson
04b7ce0afa Tests rewriting redirects of POST as GET 2015-08-30 12:14:06 +10:00
Sam Gibson
2eaac7e3f9 Adds tests for gzip/deflate response decoding 2015-08-30 12:14:05 +10:00
Sam Gibson
6064ee8756 Eliminates need to box response reader
I don't know how idiomatic this is for rust, but the only way I could think of to do this is with a union enum and generics. As the number of decoders should never be more than a few, this shouldn't really be a problem.
2015-08-30 12:14:05 +10:00
Sam Gibson
879b058be2 Returns LoadResponse struct instead of a tuple
Still boxes the reader, but at least is a step in the right direction
2015-08-30 12:14:05 +10:00
Sam Gibson
3c756d254b Avoids sending a request body on a redirect 2015-08-30 12:14:04 +10:00
Sam Gibson
15d82091c5 Fixes tidy overlong lines 2015-08-30 12:14:04 +10:00
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