diff --git a/components/net/http_cache.rs b/components/net/http_cache.rs index b6cd741f3ed..94a6331bb30 100644 --- a/components/net/http_cache.rs +++ b/components/net/http_cache.rs @@ -146,7 +146,8 @@ fn response_is_cacheable(metadata: &Metadata) -> bool { directive.max_age().is_some() || directive.no_cache() { - is_cacheable = true; + // If cache-control is understood, we can use it and ignore pragma. + return true; } } if let Some(pragma) = headers.typed_get::() { diff --git a/tests/wpt/meta/fetch/http-cache/pragma-no-cache-with-cache-control.html.ini b/tests/wpt/meta/fetch/http-cache/pragma-no-cache-with-cache-control.html.ini deleted file mode 100644 index 5e3ad18d789..00000000000 --- a/tests/wpt/meta/fetch/http-cache/pragma-no-cache-with-cache-control.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pragma-no-cache-with-cache-control.html] - [Response with Cache-Control: max-age=2592000, public and Pragma: no-cache should be cached] - expected: FAIL