aboutsummaryrefslogtreecommitdiffstats
path: root/components/net
Commit message (Collapse)AuthorAgeFilesLines
* Backout `Host`-header related change from #32024. (#32093)Philip Lamb2024-04-163-25/+1
| | | #32024 broke a different set of nginx sites, and a more sophisticated fix for the case of a missing HTTP 1.1 `Host` header is required.
* Fixes for HTTP header compliance. (#32024)Philip Lamb2024-04-113-21/+41
| | | | | - Fix 400 errors from nginx in response to Servo requests by implementing conformant albeit non-normative removal of whitespace from `Accept` and `Accept-Language` HTTP headers. (To match behaviour of Firefox, Safari, and Chrome) https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.2 - Provide `Host` header as REQUIRED by HTTP protocol https://www.rfc-editor.org/rfc/rfc9110#field.host - Update tests.
* clippy: Allow `too_many_arguments` for existing functions (#31974)eri2024-04-021-3/+3
| | | | | * Allow `too_many_arguments` for existing functions * fix: Surround ASCII with code block in rustdoc
* clippy: fix `result_unit_err` warnings (#31791)eri2024-03-213-23/+21
| | | | | | | | | | | | | | | | | * clippy: fix `result_unit_err` warnings * feat: fix result warnings in script * doc: document `generate_key` return type Co-authored-by: Martin Robinson <mrobinson@igalia.com> * feat: add back result to RangeRequestBounds::get_final Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Net: fold websocket and http tokio runtime into one (#31771)tannal2024-03-216-19/+19
| | | | | | | | | * net: use the same tokio runtime in websocket loader #31648 * readability * license
* fix: missing thread name when spawning (#31656)Ngo Iok Ui (Wu Yu Wei)2024-03-141-0/+1
| | | | | * Add missing thread name when spawning * Update namings
* clippy: Fix warnings in `components/net` (#31626)eri2024-03-138-53/+54
| | | | | * clippy: fix warnings in `components/net` * fix: review comments
* fix: unused mem import (#31608)eri2024-03-101-1/+1
|
* Fix more clippy warnings in `components/shared/net` (#31548)Mucha Naibei2024-03-101-4/+4
| | | | | | | | | | | * Fix clippy warnings in components/shared * Fix build error * Fixes in order to solve some merge issues --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: fix warnings in components/net (#31564)eri2024-03-1022-379/+325
| | | | | | | * clippy: fix some warnings in components/net * fix: review comments * fix: tidy
* Make image decoding thread pool the size of the system's CPUs (#31585)eri2024-03-081-2/+9
|
* Use thread pool to decode image (#31517)eri2024-03-071-2/+8
| | | | | | | | | | | * feat: do not spawn dedicated thread to decode image * fix: change comment to docstring Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com> --------- Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* script: Do not run layout in a thread (#31346)Martin Robinson2024-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Do not run layout in a thread Instead of spawning a thread for layout that almost always runs synchronously with script, simply run layout in the script thread. This is a resurrection of #28708, taking just the bits that remove the layout thread. It's a complex change and thus is just a first step toward cleaning up the interface between script and layout. Messages are still passed from script to layout via a `process()` method and script proxies some messages to layout from other threads as well. Big changes: 1. Layout is created in the script thread on Document load, thus every live document is guaranteed to have a layout. This isn't completely hidden in the interface, but we can safely `unwrap()` on a Document's layout. 2. Layout configuration is abstracted away into a LayoutConfig struct and the LayoutFactory is a struct passed around by the Constellation. This is to avoid having to monomorphize the entire script thread for each layout. 3. Instead of having the Constellation block on the layout thread to figure out the current epoch and whether there are pending web fonts loading, updates are sent synchronously to the Constellation when rendering to a screenshot. This practically only used by the WPT. A couple tests start to fail, which is probably inevitable since removing the layout thread has introduced timing changes in "exit after load" and screenshot behavior. Co-authored-by: Josh Matthews <josh@joshmatthews.net> * Update test expectations * Fix some issues found during review * Clarify some comments * Address review comments --------- Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* deps: Remove unused crate dependencies (#31185)Martin Robinson2024-01-261-1/+0
| | | These were identified with `cargo-marchete`.
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-227-7/+7
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Revert "Replace time with std::time in components/net (#31079)" (#31120)Martin Robinson2024-01-187-129/+89
| | | This reverts commit 580062228bb083ccdc2144a43491bc4f916c57ad.
* Replace time with std::time in components/net (#31079)Taym Haddadi2024-01-177-89/+129
| | | | | | | | | | | | | * Replace time with std::time in components/net Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix cookie::test_sort_order test Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Replace time with std::time in components/devtools (#30927)Taym Haddadi2024-01-031-5/+4
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Move `*_traits` and other shared types to `shared`Martin Robinson2023-11-031-5/+5
| | | | | | | | | | | | This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`.
* Update network stack dependencies (#30612)Martin Robinson2023-11-021-1/+1
| | | | | | | | - webpki-roots - webpki - async-tungstenite - rustls - rustls-webpki - ring
* Enable debug assertions for all builds other than official releases (#30509)Delan Azabani2023-10-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Run main and try jobs with debug assertions * use single quotes in workflow expressions * set force-debug-assertions in main.yml * set force-debug-assertions as part of decision job * fix typo in MachCommands.build * fix more hardcoded profile names * fix tidy * split cargo_profile_option on windows * Fix running servoshell and unit tests through a symlink * rename steps to make them less confusing * fix more hardcoded cargo profile options * fix missing inputs in linux-wpt and mac-wpt * make filename an inherent method of Resource * rework release-with-debug-assertions profile to production profile * rework resource logic to eliminate std_test_override * set production flag in nightly release builds * clean up servobuild.example and windows.yml * oops forgot to check in embedder_traits/build.rs * fix mach test-unit behaviour through symlink * unit tests only need current_dir and ancestors * fix macOS package smoketest breakage * expect css/css-color/currentcolor-003 to crash under layout 2013 * fix more references to {force,release-with}-debug-assertions * fix local build failures under --profile production
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-1126-228/+248
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-0814-16/+23
| | | | | | | | | | | * 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>
* constellation: crash to a new “sad tab” error page (#30290)Delan Azabani2023-09-061-0/+7
| | | | | | | | | | | | | | | | | | | | | * constellation: crash to a new “sad tab” page * check in resources/crash.html * use a separate enum variant instead of keying on reason * fmt + tidy * rename Resource::Crash to Resource::CrashHTML * clean up crash page and add details (reason + backtrace) * avoid repeating crash errors in script::script_thread warn log * make new LoadData init more idiomatic * clarify comments and new fields * fix doc comment style
* Replace `immeta` dependency with `imsz` (#30294)Martin Robinson2023-09-062-13/+12
| | | | `immeta` is no longer maintained and `imsz` seems to have support for more image formats as well as having no dependencies itself.
* Format toml files (#30112)Samson2023-08-171-3/+3
| | | | | | | * Add taplo fmt config for toml fmt * fmt toml files * Add even-better-toml to extensions recommendations
* Switch to rustls and webpki-roots (#30025)Martin Robinson2023-08-0811-399/+414
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* bump base64 from 0.10 to 0.21 (#29804)Tuna2023-08-023-4/+7
| | | | | | | | | * bump base64 from 0.10 to 0.21 * Fix configuration of bitflags --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Remove customised implementation of hsts headers. (#30046)shanehandley2023-07-311-93/+9
| | | This looks to have originally been implemented due to missing functionality in the headers crate, which has since been added and released.
* Try to `use` WebRender types moreMartin Robinson2023-07-101-5/+6
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Vendor the current version of WebRenderMartin Robinson2023-07-031-1/+1
| | | | | | | | This is a step toward upgrading WebRender, which will be upgraded and patched in the `third_party` directory. This change vendors the current private branch of WebRender that we use and adds a `patches` directory which tracks the changes on top of the upstream WebRender commit described by third_party/webrender/patches/head.
* Update uuidMartin Robinson2023-06-262-2/+2
| | | | | This is required to use the new version of gleam and update ipc-channels without duplicating the dependency in the future.
* Update tungsteniteFabrice Desré2023-05-202-63/+46
|
* Auto merge of #29748 - Loirooriol:sync, r=mrobinsonbors-servo2023-05-191-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport several style changes from Gecko <!-- 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: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [X] 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. -->
| * Further changes required by ServoOriol Brufau2023-05-191-0/+2
| |
* | Auto merge of #29752 - mrobinson:fix-29741-by-extending-request-builder, ↵bors-servo2023-05-181-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=mukilan Fix 29741 by extending request builder Extend RequestBuilder to include ResponseTainting and used said functionality to set response_tainting to `::CorsTainting` in `cors_preflight_fetch()`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #29741 <!-- 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. -->
| * | use response tainting::cors in cors preflightIver Småge men bærbar2023-05-181-0/+1
| |/
* / Start the transition to workspace dependenciesMartin Robinson2023-05-171-22/+22
|/ | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* Make sender and receiver name more coherentatbrakhi2023-05-081-8/+8
|
* Fix concept-header-list-get-decode-split2shiori172023-03-261-2/+2
|
* Fix return value of concept-header-list-get to Option<Vec<u8>>2shiori172023-03-261-13/+17
|
* Remove net from dependencies2shiori172023-03-201-16/+1
|
* Implement concept-header-list-sort-and-combine2shiori172023-03-061-1/+1
|
* Switch to the sha2 crate for SRI digests.Fabrice Desré2023-02-242-10/+14
| | | | This removes one (simple) use of OpenSSL
* Fix intermittency when loading poster imagesMartin Robinson2023-01-111-0/+2
| | | | | | | | | | | | | | | | | Wait until a poster image is cached to in order to unblock document load. If not, the document may continue loading before the image is ready to use, leading to intermittency in test output. Now load is unblocked when getting the ImageResponse from the cache, which allows the code to properly unblock the load when the entire load fails or succeeds. This reveals several false passes in the `object-view-box` test suite which were very flaky. Fixes #29204. Fixes #29188. Fixes #29179. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* components/net: Fix a double-lock in image_cacheBurtonQin2022-10-101-15/+27
|
* Update cookie/hyper_serde.Josh Matthews2022-04-011-2/+2
|
* Upgrade HyperNaveen Gattu2022-01-1617-353/+416
|
* Fix warnings.Josh Matthews2022-01-033-5/+3
|