servo/components/shared/net
Andrei Volykhin 6a1a3aea08
html: Allow legacy referrer policies only for <meta> referrer (#39506)
Follow the HTML specification and allow to use legacy referrer policies
(never/default/always/origin-when-crossorigin) only with 'meta'
referrer.

See https://html.spec.whatwg.org/multipage/#meta-referrer (step 5)

While for another HTML elements with 'referrerpolicy' content attribute
(https://html.spec.whatwg.org/multipage/#referrer-policy-attribute)
and for 'Referrer-Policy' HTTP header

(https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header-dfn)
the referrer policy should be determine from the standard policy tokens
(https://w3c.github.io/webappsec-referrer-policy/#referrer-policy).

So unknown policy values (legacy from meta-referrer) will be ignored
and determine as 'ReferrerPolicy::EmptyString'.

Testing: No changes

Fixes: #36833

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-09-30 16:29:24 +00:00
..
fetch Use spec compliant content-type extraction in more places and enable a <stylesheet> quirk (#28321) 2025-05-19 11:38:01 +00:00
tests Hookup mime classifier to main document loader (#39109) 2025-09-04 08:30:55 +00:00
blob_url_store.rs Fix more clippy warnings in components/shared/net (#31548) 2024-03-10 17:47:38 +00:00
Cargo.toml Cargo.toml cleanup (#39403) 2025-09-20 03:09:37 +00:00
filemanager_thread.rs Don't slice a sliced blob (#36866) 2025-05-06 07:25:11 +00:00
http_status.rs Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
image_cache.rs Add a basic caching mechanism for ImageKeys. (#37369) 2025-07-03 13:16:43 +00:00
lib.rs html: Allow legacy referrer policies only for <meta> referrer (#39506) 2025-09-30 16:29:24 +00:00
mime_classifier.rs script: display top-level SVG image documents. (#39494) 2025-09-29 09:16:22 +00:00
policy_container.rs Add resource header for mime sniffing (#39167) 2025-09-07 12:31:57 +00:00
pub_domains.rs More changes to HashMap/HashSet to use fxhash (#39244) 2025-09-29 09:51:17 +00:00
quality.rs tidy: Add a rule ensuring that // comments are followed by a space in Rust (#38698) 2025-08-18 12:09:09 +00:00
request.rs html: Count <image> attributes state changes as the relevant mutations (#39483) 2025-09-29 09:00:51 +00:00
response.rs Use spec compliant content-type extraction in more places and enable a <stylesheet> quirk (#28321) 2025-05-19 11:38:01 +00:00