mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Auto merge of #17883 - frewsxcv:frewsxcxv-lowercase, r=SimonSapin
Audit usages of unicode case-changing methods. Part of https://github.com/servo/servo/issues/17777. <!-- 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/17883) <!-- Reviewable:end -->
This commit is contained in:
commit
5fff90c73f
10 changed files with 46 additions and 48 deletions
|
@ -3875,8 +3875,7 @@ fn update_with_current_time_ms(marker: &Cell<u64>) {
|
|||
|
||||
/// https://w3c.github.io/webappsec-referrer-policy/#determine-policy-for-token
|
||||
pub fn determine_policy_for_token(token: &str) -> Option<ReferrerPolicy> {
|
||||
let lower = token.to_lowercase();
|
||||
return match lower.as_ref() {
|
||||
match_ignore_ascii_case! { token,
|
||||
"never" | "no-referrer" => Some(ReferrerPolicy::NoReferrer),
|
||||
"default" | "no-referrer-when-downgrade" => Some(ReferrerPolicy::NoReferrerWhenDowngrade),
|
||||
"origin" => Some(ReferrerPolicy::Origin),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue