Commit graph

143 commits

Author SHA1 Message Date
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
Ms2ger
fc68e0a6ca Add a FileManager to FetchContext. 2016-10-14 11:30:09 +02:00
Ms2ger
d820387758 Stop wrapping FileManager in an Arc.
It already contains an Arc internally.
2016-10-14 11:30:08 +02:00
Corey Farwell
60afad1b61 Migrate user agent string to Cow<'static, str>.
In most scenarios, where the user of Servo will not override the default
user agent, the user agent can be a `&'static str`. But since we allow
for customization, we currently use a `String` to represent the user
agent. This commit migrates the user agent to be represented as a
`Cow<'static, str>`, which (at the cost of ergonomics) prevents
unnecessary allocations whenever cloning the user agent string in the
scenario the user doesn't override the user agent.
2016-10-10 16:34:20 -04:00
bors-servo
b1d8eff467 Auto merge of #13411 - frewsxcv:mime, r=jdm
Migrate mime_classifier top-level string to enum.

I made this branch months ago and forgot about it. Instead of just throwing the changes away, I rebased off origin/master and opened this pull request. If these changes aren't desired, no feelings hurt, just close this. If they are desired, let me know if there are any changes you want me to make and I'll also need to rewrite/squash the commits.

<!-- 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/13411)
<!-- Reviewable:end -->
2016-10-08 15:40:47 -05:00
Corey Farwell
349e01f6eb Fix capitalization for enum variants. 2016-10-08 15:48:18 -04:00
Corey Farwell
66303e40b5 Migrate mime_classifier top-level string to enum. 2016-10-08 15:41:58 -04:00
Bryan Gilbert
82e45a403f updated basic auth cache to key off of url origin 2016-09-15 22:08:52 -04:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Zhen Zhang
17ae38a318 Add cancellability to file manager load and related refactoring 2016-08-02 23:51:51 +02:00
ddh
db808ca75d Added devtools support to fetch for XHR + Manish's XHR ident fix
added unit test for request fetch with devtools

added devtools/fetch test
2016-07-29 11:20:38 +01:00
Anthony Ramine
8d919c5c1f Remove use of util::opts from storage_thread 2016-07-27 10:25:48 +02:00
Anthony Ramine
1662e292d8 Remove use of util::opts from resource_thread 2016-07-27 10:22:06 +02:00
Rahul Sharma
eff3e01df0 make resource_thread talk to sw-manager 2016-07-18 19:06:48 +05:30
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30