aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* remove `extern crate` (#30311)Samson2023-09-081-13/+0
| | | | | | | | | | | * 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>
* Switch to rustls and webpki-roots (#30025)Martin Robinson2023-08-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix some 'nosniff' testsVincent Ricard2021-03-081-0/+2
|
* Remove some unused dependency declarationsSimon Sapin2020-05-291-0/+3
| | | | | | This is based on compiling with `RUSTFLAGS="-W unused_crate_dependencies"` (CC https://github.com/rust-lang/rust/pull/72342) in a recent Nightly (more so than used in the tree as of this writing, CC https://github.com/servo/servo/issues/26661 for work-arounds). Only one crate is actually removed from the dependency graph, others are still dependended from other places.
* Use the `matches!` macro from the standard librarySimon Sapin2020-02-121-2/+0
|
* #8539 Config preferences backend restructurePeter Hall2019-03-201-0/+2
|
* Redesign network response decoding to avoid creating decoders before some ↵Josh Matthews2019-01-151-0/+1
| | | | content is present.
* Add support fo byte range requests for blob URLsFernando Jiménez Moreno2018-11-261-1/+0
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-35/+0
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-2/+2
|
* Rustfmt net cratePyfisch2018-11-031-4/+9
|
* Update hyper to 0.12Bastien Orivel2018-11-011-2/+5
|
* Merge some byte swap/premultiply functions in their own crateAnthony Ramine2018-10-061-0/+1
|
* Replace mpsc with crossbeam/servo channel, update ipc-channelSimon Sapin2018-09-121-0/+1
| | | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Replace servo-websocket by wsBastien Orivel2018-08-151-1/+1
| | | | | | This is heavily based on previous work done in #16012. Fixes #14517
* move msg to embedder_traits, use in script, handle send error in embedderGregory Terzian2018-05-231-1/+0
|
* refactor(filemanager): uses embedderproxy directlyOJ Kwon2018-04-271-1/+1
|
* refactor(filemanager): remove awareness to ui behaviorOJ Kwon2018-04-271-2/+0
|
* refactor(resourcethread): expose constellationmsg channelOJ Kwon2018-04-271-0/+1
|
* delegate resource reading to embedderPaul Rouget2018-04-271-2/+1
|
* Measure cache memory usage (#19251):modal-d172018-04-011-0/+5
| | | | | | | | | | | | | Made the memory cache data structure derive MallocSizeOf, along with manual size_of() implementations in malloc_size_of. Added a Measurable struct that acts as a container for fields size_of() can be called for. Added a new IpcReceiver used for listening to messages from the memory profiler, and used run_with_memory reporting to register a memory reporter in the thread. Now when a message from the memory profiler arrives, report includes sizes of public and private http caches. Updated test file.
* Replace parse-hosts crate with 10 lines of code.Simon Sapin2017-11-281-1/+0
| | | | | | | | This removes 3927 lines of Rust code in 6 crates from the dependency graph: parse-hosts, multistr, bow, extra-default, len-trait, and push-trait. One of these crates doesn’t build in today’s Nightly: https://github.com/rust-lang/rust/issues/46328
* Beginnings of a http cacheJosh Matthews2017-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doom cache entries based on the initial response, and prevent matching against doomed cache enties. Evict cache entries that have passed their expiry date instead of matching them. Document the cache. Refactor incomplete entries to lessen Option-itis. Revalidate expired cache entries instead of unconditionally evicting them. Forbid missing docs in cache code. Revalidate must-revalidate entries. Fetch content tests from a local HTTP server. Track requests made to the test HTTP server. Add a simple test that a cached resource with no expiry is not revalidated. Correct inverted expiry check in revalidation code. Fix incorrect revalidation logic that dropped the consumer channels on the floor. Ensure that requests are cached based on their request headers. Run a separate http server instance for each test to avoid intermittent failures due to concurrent cache tests. Add a test for uncacheable responses. Address review comments.
* Remove usage of unstable box syntax, except in the script crateSimon Sapin2017-10-121-1/+0
| | | | | … because there’s a lot of it, and script still uses any other unstable features anyway.
* Remove usage of unstable feature iterator_step_bySimon Sapin2017-10-111-1/+0
|
* Upgrade to the latest version of WebRenderMartin Robinson2017-07-131-1/+1
|
* Remove explicit dependencies on serde_deriveSimon Sapin2017-06-161-3/+1
|
* Update Rust nightly to 1.19.0-nightly (2416e222e 2017-06-09)Anthony Ramine2017-06-091-1/+1
|
* Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)"Anthony Ramine2017-06-031-1/+1
| | | | This reverts commit f081380dc03dba9664877df2829097f32c40694a.
* Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)Anthony Ramine2017-06-031-1/+1
|
* Redirect document loads manuallyNikhil Shagrithaya2017-05-311-1/+1
|
* Move hosts module into net crate. Remove obsolete functions.Josh Matthews2017-04-061-0/+5
|
* Move the HTTP connector to FetchContextAnthony Ramine2017-04-031-1/+1
|
* Update Hyper and OpenSSLddh2017-03-311-1/+1
|
* Move image cache implementation to the net crateFernando Jiménez Moreno2017-03-271-0/+4
|
* Make image cache per-document rather than globalFernando Jiménez Moreno2017-03-271-6/+0
|
* Replace use of rustc_serialize::base64 by base64Anthony Ramine2017-03-261-1/+1
|
* Premultiply RGBA image data before sending to webrenderJamie Nicol2017-03-101-0/+1
|
* Remove unused content blocker code.Ms2ger2017-03-071-3/+0
| | | | | 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.
* Use serde_json to persist cookies in the net crateAnthony Ramine2017-02-221-0/+4
|
* Kill the plugins crate and its clippy supportAnthony Ramine2017-02-211-4/+1
| | | | | | Sometimes clippy gets outdated by months, and its current support setup means that each Servo component need to opt into it by depending on the plugins crate manually, and not all components do that.
* Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23).Ms2ger2017-01-241-4/+0
|
* Implement Subresource Integritymrnayak2017-01-081-1/+1
| | | | | | | | | | | Implemented response validation part of https://w3c.github.io/webappsec-subresource-integrity/. Implemented step eighteen of the main fetch. If a request has integrity metadata, then following steps are performed *Wait for response body *If the response does not have a termination reason and response does not match request’s integrity metadata, set response to a network error.# Please enter the commit message for your changes. Lines starting
* Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06)Simon Sapin2017-01-061-1/+0
|
* Removed util.Alan Jeffrey2016-12-141-1/+1
|
* Remove CoreResourceMsg::Load.Ms2ger2016-11-241-4/+0
| | | | | | | | 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.
* Rewrite test_redirect_from_x_to_x_provides_x_with_cookie_from_first_response.Ms2ger2016-11-231-2/+1
|
* Use FnvHasher in http_loader::loadAnthony Ramine2016-11-191-0/+1
| | | | Should help with #11100.