aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch/methods.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/fetch/methods.rs')
-rw-r--r--components/net/fetch/methods.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs
index 55cef372c1b..1584597da87 100644
--- a/components/net/fetch/methods.rs
+++ b/components/net/fetch/methods.rs
@@ -340,15 +340,16 @@ pub fn main_fetch(
.map(|v| v.iter().collect());
match header_names {
// Subsubstep 2.
- Some(ref list) if request.credentials_mode != CredentialsMode::Include => {
- if list.len() == 1 && list[0] == "*" {
- response.cors_exposed_header_name_list = response
- .headers
- .iter()
- .map(|(name, _)| name.as_str().to_owned())
- .collect();
- }
- },
+ Some(ref list)
+ if request.credentials_mode != CredentialsMode::Include &&
+ list.iter().any(|header| header == "*") =>
+ {
+ response.cors_exposed_header_name_list = response
+ .headers
+ .iter()
+ .map(|(name, _)| name.as_str().to_owned())
+ .collect();
+ }
// Subsubstep 3.
Some(list) => {
response.cors_exposed_header_name_list =