fune/netwerk/test/browser/res_object.html
Eden Chuang 4ce2d06b79 Bug 1714299 - Correct the opaque response judgment for opaque response blocking. r=necko-reviewers,annevk,dragana
An opaque response should be not only cross-origin but also be request with no_cors request mode.

To filter out the request with mode Same_origin, navigate, and cors. This patch reuses the algorithm in InternalRequest/FetchDriver to decide whether a response is an opaque response.

https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/InternalRequest.cpp#331
https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/FetchDriver.cpp#1153,1157

Differential Revision: https://phabricator.services.mozilla.com/D117086
2021-07-02 23:11:55 +00:00

18 lines
349 B
HTML

<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<html>
<body>
<p>Dummy Page</p>
<script>
let foo = async () => {
let url = "https://example.com/browser/netwerk/test/browser/res_img.png";
await fetch(url, { mode: "no-cors" });
}
foo();
</script>
</body>
</html>