Commit graph

158 commits

Author SHA1 Message Date
Keith Yeung
99f9696a24 Merge functionality of WebsocketConnect into Fetch 2017-10-24 20:54:19 -07:00
Bastien Orivel
76d8573393 Bump serde to 1.0 2017-06-16 13:31:18 +02:00
Nikhil Shagrithaya
541baafe1c Redirect document loads manually 2017-05-31 17:28:53 +05:30
Anthony Ramine
10801caefd Kill ResourceGroup 2017-04-06 19:41:10 +02:00
Anthony Ramine
16863017a9 Move the HTTP connector in HttpState 2017-04-06 19:35:11 +02:00
Anthony Ramine
949a0827e0 Move the SSL client in HttpState 2017-04-06 18:11:20 +02:00
Josh Matthews
dc99104f55 Add command-line argument to use a custom SSL certificate database. 2017-04-06 19:25:34 +09:00
Josh Matthews
6079dd4de7 Enable HTTP connection pooling. Retry stale connections indicated by connection reset errors. 2017-04-04 19:40:46 -04:00
Anthony Ramine
1e91442d98 Don't share the SSL client between the private and public groups 2017-04-03 17:37:37 +02:00
Anthony Ramine
64ba597a3a Move Arc out of HttpState 2017-04-03 14:00:36 +02:00
Anthony Ramine
8683f4d43e Reuse HttpState in ResourceGroup 2017-04-03 12:47:35 +02:00
Anthony Ramine
016fee016b Move the HTTP connector to FetchContext 2017-04-03 12:47:33 +02:00
Anthony Ramine
cb2eb81208 Remove all internal mutability from Request 2017-04-03 12:39:07 +02:00
Anthony Ramine
f42a63baea Make fetch take a &Request 2017-04-03 12:33:43 +02:00
Anthony Ramine
20e0b6cd56 Introduce create_ssl_client
This lets us reuse the same SSL context for all HTTPS requests.
2017-04-02 15:27:40 +02:00
Josh Matthews
30fad4ea9d Revert "Enable HTTP pooling again (fixes #15694)". 2017-04-01 10:26:51 -04:00
Anthony Ramine
1ff2bebdd7 Enable HTTP pooling again (fixes #15694) 2017-03-31 23:09:51 +02:00
ddh
e527c9a991 Update Hyper and OpenSSL 2017-03-31 16:32:21 +02:00
Anthony Ramine
f66cae3f96 Revert "Introduce create_ssl_context"
This reverts commit 7a4632bfa2.
2017-03-31 16:19:00 +02:00
Anthony Ramine
857958f516 Revert "Store SSL context in ResourceGroup"
This reverts commit 02b2aa159a.
2017-03-31 16:18:59 +02:00
Anthony Ramine
19a2516e10 Disable wss support
None of the existing websocket libraries are currently able to cope
with openssl 0.9 and be featureful, so we are disabling wss for now
to land openssl 0.9.
2017-03-31 16:18:47 +02:00
Anthony Ramine
d022535f9c Make the WebSocket handshake ourselves to ease switching libs
We need to switch to tungstenite to finally update openssl, this commit
rewrites the whole websocket infrastructure to properly follow the Fetch
spec and to make switching to a different websocket library easier.
2017-03-29 19:17:27 +02:00
Anthony Ramine
02b2aa159a Store SSL context in ResourceGroup
This allows sharing it with the HTTP state in CoreResourceManager::fetch.
2017-03-28 00:52:10 +02:00
Anthony Ramine
7a4632bfa2 Introduce create_ssl_context 2017-03-28 00:37:25 +02:00
Ms2ger
5a61d8b2ea Remove unused content blocker code.
I don't know what it is for, so I believe it would be better to remove it
entirely until and unless we start using it.
2017-03-07 10:29:27 +01:00
bors-servo
a780f6f28c Auto merge of #15696 - jdm:no-http-pool, r=emilio
Do not pool HTTP connections.

HTTP connection pooling triggers consistent failures in #14620. Let's disable it until there's more time to solve the underlying problem in #15694.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15696)
<!-- Reviewable:end -->
2017-02-23 03:55:45 -08:00
Josh Matthews
3258cffcda Do not pool HTTP connections. 2017-02-22 17:16:28 -05:00
Anthony Ramine
fd9cd33892 Use serde_json to persist cookies in the net crate 2017-02-22 12:33:10 +01:00
Dowon Cha
8bf924dc79 Added Websocket to RequestMode enum
set unreachable in dom/request.rs for websocket

fixed imports
2017-01-08 09:17:53 -05:00
Raghav
6020b4c15c Implement HSTS fetch step
Implemented step nine of the main fetch. If current URL scheme is 'HTTP'
and current URL's host is domain and if current URL's host matched with
Known
HSTS Host Domain Name Matching results in either a superdomain match with
an asserted includeSubDomains directive or a congruent match then we
change request scheme to 'https'. This change has been made in method.rs

A test case to validate this has been added in fetch.rs. For asserting
https scheme, a https localhost was required. For this purpose I have
created a self-signed certificate and refactored fetch-context and
connector.rs to programmatically trust this certificate for running this
test case.
2016-12-29 12:55:31 +05:30
Matt McCoy
ed075ab552 Reuse the http connector pool between fetches 2016-12-26 19:39:11 -05:00
Keith Yeung
63a7e8efdf Add domain and path checks for secure cookies eviction 2016-12-21 03:39:38 -08:00
bors-servo
bde8dce756 Auto merge of #14526 - frewsxcv:cookies, r=jdm
Attempt at refactoring and simplifying 'set cookies' operations on resource thread.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14526)
<!-- Reviewable:end -->
2016-12-15 15:54:39 -08:00
Corey Farwell
77d2f9de36 Refactor and simplify 'set cookies' operations on resource thread. 2016-12-15 15:34:04 -05:00
Ms2ger
217f44b67a Make the fetch target non-optional. 2016-12-15 10:49:04 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Ms2ger
cd40bb54ae Remove ProgressSender. 2016-12-13 17:15:12 +01:00
Ms2ger
1f9d7ddf4d Remove unused send_error, start_sending_sniffed_opt. 2016-12-13 17:14:53 +01:00
Raghav
c1518adba8 Redesign CookieStorage and Implement Leave Secure Cookie Alone
CookieStorage has been refactored to use HashMap with base domain as the
key. Values of hashmap is vector of cookies.
CookieStorage now has max_per_host which restricts maximum cookies that
can be added per base domain.
Cookie eviction doesnot take place if max_per_host is not reached.
Cookie eviction logic implemented here does following steps
1) Evict all expired cookies
2) Remove oldest accessed non-secure cookie If any
3) When no non-secure cookie exist, remove oldest accessed secure cookie
if new cookie being added is secure. Else ignore new cookie
2016-12-04 16:29:38 -05:00
Ms2ger
761524c01b Remove some unused arguments.
The change to the unit test is necessary because the resource thread is not
resilient against either of these Senders being dropped while the resource
thread is running. Before this change, it held clones of those senders itself
(public_setup_chan_clone, private_setup_chan_clone).
2016-11-24 11:46:33 +01:00
Ms2ger
69f856486a Remove unused CancellableResource and CancellationListener types. 2016-11-24 11:46:32 +01:00
Ms2ger
7913f3adaf Remove the unused CancellationListener arguments in filemanager_thread. 2016-11-24 11:46:30 +01:00
Ms2ger
fb1279ec3a Remove CoreResourceMsg::Load.
Also remove now-dead code that rustc warns about.

It turns out that we lost support for some of our custom URL schemes; I intend
to reimplement them, but I believe this will be significantly easier to do
once the legacy code is out of the way.
2016-11-24 11:46:24 +01:00
Ms2ger
15e8f4f0d4 Properly exit the core resource thread. 2016-11-24 11:46:22 +01:00
Ms2ger
ae1340bf50 Pass the UIProvider to FileManager::handle() as needed. 2016-11-21 10:37:26 +01:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Ms2ger
234b47e33e Pass a borrowed fetch context to fetch().
This will allow inspecting its state after fetching in unit tests.
2016-11-08 18:01:23 +01:00
Ms2ger
fe3d512ea4 Remove ProgressSender::Listener. 2016-11-02 16:15:23 +01:00
Ms2ger
8a6016013e Remove unused argument to start_sending_opt. 2016-11-02 16:15:22 +01:00
Ms2ger
40c711bf97 Remove LoadConsumer::Listener. 2016-11-02 16:15:21 +01:00