Tony
d49689bf09
Support isSecureContext
for custom protocols
...
Signed-off-by: Tony <legendmastertony@gmail.com>
2025-04-25 22:01:08 +08:00
Tony
894fbd003d
Initial support for marking custom protocol secure ( #36656 )
...
Add initial support for marking custom protocol as secure, this makes it
possible to `fetch` a custom protocol inside secure contexts (e.g.
http://localhost )
Some additional contexts:
- [#embedding > Custom protocol secure
context](https://servo.zulipchat.com/#narrow/channel/437943-embedding/topic/Custom.20protocol.20secure.20context )
-
https://github.com/versotile-org/tauri-runtime-verso/issues/6#issuecomment-2820776128
Testing: use `fetch('urlinfo://abc').then(async (response) =>
console.log(await response.text())).catch(console.log)` in servoshell
with in a secure context (e.g. https://servo.org ), and see the response
should not be an error
---------
Signed-off-by: Tony <legendmastertony@gmail.com>
Signed-off-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-04-25 10:39:33 +00:00
Jonathan Schwender
cf59aa1948
Return Result from ProtocolRegistry::register() ( #36688 )
...
Instead of returning true / false it's better to return a Result (even
if we continue ignoring possible error).
Testing: Doesn't change any behavior
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-25 10:02:46 +00:00
Simon Wülker
3d320fa96a
Update rustfmt to the 2024 style edition ( #35764 )
...
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-03 11:26:53 +00:00
Josh Matthews
76e0a1872b
Update all network-related dependencies to the latest versions ( #34630 )
...
* Update all network-related dependencies to the latest versions:
* rustls
* hyper
* http
* headers
* tungstenite
* async-tungstenite
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Fix panics with 1xx responses in WPT tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Use reported response length when calculating available ranges.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Remove unreachable match arm.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Clean up commented fragments in blob and file handlers.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Remove unreachable match arm.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Fix clippy warning.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Cleanup.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Fix up unit tests for dependency upgrades.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update aws-lc-sys to fix Windows builds.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Use ring instead of aws-lc-sys.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* embedding: Require embedder to initialize a rustls CryptoProvider.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Disable aws-lc-rs pending OhOS build fixes.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-08 05:47:58 +00:00
webbeef
58f34ad7a3
Create HttpStatus to safely deal with HTTP responses status. ( #33581 )
...
Signed-off-by: webbeef <me@webbeef.org>
2024-09-29 18:23:48 +00:00
webbeef
f57ae60056
Let protocol handlers decide if they are fetchable ( #33573 )
...
This adds a 'is_fetchable()' method on the ProtocolHandler trait that is then used in the fetch code.
The 'data:' protocol handler is updated to return true instead of hardcoding the scheme comparison, as well
as the 'urlinfo:' handler since it's just a testing one.
Signed-off-by: webbeef <me@webbeef.org>
2024-09-28 19:38:49 +00:00
webbeef
663a92a5df
make protocol handlers registrable ( #33104 )
...
Signed-off-by: webbeef <me@webbeef.org>
2024-08-22 04:11:16 +00:00