forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross-Origin-Resource-Policy shouldn't apply to Save-Link-As downloads.
This CL makes sure that download requests initiated by download::ResourceDownloader::Start use network::mojom::FetchRequestMode::kNavigate mode (rather than the default kNoCors mode). Bug: 952834 Change-Id: Ie99a4e024864f442e439e621d54ed7dae92f1393 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1572876 Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#652578}
- Loading branch information
1 parent
1a8158b
commit aadaf27
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
chrome/test/data/downloads/cross-origin-resource-policy-resource.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Resource served with `Cross-Origin-Resource-Protected: same-origin`. |
3 changes: 3 additions & 0 deletions
3
chrome/test/data/downloads/cross-origin-resource-policy-resource.txt.mock-http-headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
HTTP/1.0 200 OK | ||
Content-Type: text/plain | ||
Cross-Origin-Resource-Policy: same-origin |
3 changes: 3 additions & 0 deletions
3
chrome/test/data/downloads/cross-origin-resource-policy-test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<a | ||
href="/cross-site/bar.com/downloads/cross-origin-resource-policy-resource.txt" | ||
>link</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters