Commit graph

171 commits

Author SHA1 Message Date
Martin Robinson
b6f1e3b22d
dependencies: Upgrade cookie and rename Servo's Cookie to ServoCookie (#32861)
This changes updates to the new version of the `cookie` crate in Servo
which no longer uses the old `time@0.1` data types. This requires using
a new version of `time` while we transition off of the old one. This is
the first step in that process.

In addition, the overloading of the `cookie::Cookie` name was causing a
great deal of confusion, so I've renamed the Servo wrapper to
`ServoCookie` like we do with `ServoUrl`.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-07-26 16:13:39 +00:00
tannal
5c0199b568
Net: fold websocket and http tokio runtime into one (#31771)
* net: use the same tokio runtime in websocket loader

#31648

* readability

* license
2024-03-21 06:13:03 +00:00
Ngo Iok Ui (Wu Yu Wei)
b1debf2068
fix: missing thread name when spawning (#31656)
* Add missing thread name when spawning

* Update namings
2024-03-14 10:40:58 +00:00
eri
63527f56ca
clippy: Fix warnings in components/net (#31626)
* clippy: fix warnings in `components/net`

* fix: review comments
2024-03-13 09:40:04 +00:00
eri
67b277c992
clippy: fix warnings in components/net (#31564)
* clippy: fix some warnings in components/net

* fix: review comments

* fix: tidy
2024-03-10 15:34:16 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Martin Robinson
bce7622cde
Switch to rustls and webpki-roots (#30025)
This change replaces OpenSSL with rustls and also the manually curated
CA certs file with webpki-roots (effectively the same thing, but as a
crate).

Generally speaking the design of the network stack is the same. Changes:

- Code around certificate overrides needed to be refactored to work with
  rustls so the various thread-safe list of certificates is refactored
  into `CertificateErrorOverrideManager`
- hyper-rustls takes care of setting ALPN protocols for HTTP requests,
  so for WebSockets this is moved to the WebSocket code.
- The safe set of cypher suites is chosen, which seem to correspond to
  the "Modern" configuration from [1]. This can be adjusted later.
- Instead of passing a string of PEM CA certificates around, an enum is
  used that includes parsed Certificates (or the default which reads
  them from webpki-roots).
- Code for starting up an SSL server for testing is cleaned up a little,
  due to the fact that the certificates need to be overriden explicitly
  now. This is due to the fact that the `webpki` crate is more stringent
  with self-signed certificates than SSL (CA certificates cannot used as
  end-entity certificates). [2]

1. https://wiki.mozilla.org/Security/Server_Side_TLS
2. https://github.com/briansmith/webpki/issues/114

Fixes #7888.
Fixes #13749.
Fixes #26835.
Fixes #29291.
2023-08-08 14:00:10 +00:00
atbrakhi
55de8e3ddc Make sender and receiver name more coherent 2023-05-08 09:23:10 +02:00
Naveen Gattu
a48a111cee Upgrade Hyper 2022-01-16 09:34:17 -08:00
Naveen Gattu
903e0cd857 Non-blocking network IO 2021-12-23 11:16:24 -08:00
Josh Matthews
f030162ec3 Make reload button clear the network cache. 2020-07-27 22:34:07 -04:00
Josh Matthews
76198e40a8 net: Replace ws-rs with async-tungstenite. 2020-07-08 10:33:17 -04:00
Josh Matthews
433c154595 net: Allow SSL websockets to use dynamic list of certs as well. 2020-06-09 15:03:18 -04:00
Josh Matthews
0ce2aa917a net: Pass certs that fail the SSL handshake out of the network layer. 2020-06-09 15:03:18 -04:00
Josh Matthews
1cdaf40eb2 net: Add an SSL verification callback to support checking a dynamic list of certs. 2020-06-09 15:03:18 -04:00
Gregory Terzian
fa765168b9 net: shutdown async runtime on exit 2020-05-30 21:04:34 +08:00
Gregory Terzian
1e017a7082 allow for a service worker network mediator per origin 2020-04-05 22:43:37 +08:00
Gregory Terzian
895500e68c add a fetch token for blob urls 2020-02-21 14:26:45 +08:00
Gregory Terzian
780a1bd6cb add a core resource thread-pool 2020-02-14 10:54:31 +08:00
Patrick Shaughnessy
6d31827464 Cookies are now expired immediately before each lookup 2020-01-24 20:07:08 -05:00
Simon Sapin
fdcc7653f2 Fix some warnings in future Rust nightlies 2020-01-02 19:22:03 +01:00
Jan Andre Ikenmeyer
19226c5190
Let hyper automatically add a host header for HTTP/1 2019-12-16 14:01:18 +01:00
Josh Matthews
46b155d0e8 Disable H2 ALPN. 2019-12-13 16:13:48 -05:00
Jan Andre Ikenmeyer
b811be764c
Add ALPN and signature algorithms to OpenSSL config 2019-11-30 05:18:00 +01:00
Jan Andre Ikenmeyer
941659bb30
Use HSTS preload list for private HttpState, too. 2019-11-10 20:16:53 +01:00
Gregory Terzian
2f8932a6a1 continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00
Gregory Terzian
4f3ba70704 http-cache: wait on pending stores
and various small improvements
2019-10-08 17:58:20 +08:00
Javed Nissar
7596c36959 Move ResourceFetchTiming into Arc
The purpose of this commit is to ensure that the Response object has
access to Timing updates as previously the Response object simply
stored a ResourceFetchTiming struct so updates on ResourceFetchTiming
that were not explicitly done on the Response would not be passed down.
The references to ServoArc are added because Response uses
servo_arc::Arc rather than std::sync::Arc as is used elsewhere. So,
we've switched those other places to servo_arc::Arc instead of switching
Response to std::sync::Arc.
2019-09-18 11:54:28 -04:00
Alan Jeffrey
49a5e84fb1 Responding to review comments 2019-09-11 11:40:50 -05:00
Alan Jeffrey
1aeb97b281 Prefetch img and scripts during parsing 2019-09-10 16:13:49 -05:00
oneturkmen
9034fb64b7 Net: removed opts::get() usage 2019-06-06 18:48:17 -06:00
bors-servo
c449cbb8ea
Auto merge of #22769 - gterzian:use_thread_pool_in_resource_thread, r=nox
Use a threadpool for fetch

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #22768 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/22769)
<!-- Reviewable:end -->
2019-04-19 15:48:56 -04:00
aditj
64961cc9c1 Add webdriver deletecookies function 2019-04-19 13:15:50 +05:30
Gregory Terzian
c52cfda957 use a threadpool for fetch 2019-04-18 15:40:20 +02:00
Lucas Fantacuci
6b2be9b31d Implementing the builder pattern for RequestInit 2019-04-10 14:01:30 -03:00
ddh
26007fddd3 refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata

implemented deprecated window.timing functionality

created ResourceTimingListener trait

fixed w3c links in navigation timing

updated include.ini to run resource timing tests on ci
2018-11-20 16:21:32 +00:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Pyfisch
2481ad25f8 Rustfmt net crate 2018-11-03 15:29:01 +01:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
Alan Jeffrey
05391e27cd Add lots of derived Debug impls 2018-10-29 09:21:37 -05:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
OJ Kwon
2fab94785b
refactor(filemanager): uses embedderproxy directly 2018-04-27 12:23:25 -07:00