Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: content/browser/frame_host/ancestor_throttle.cc

Issue 2874933002: Don't enforce X-Frame-Options for downloads. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/ancestor_throttle.cc
diff --git a/content/browser/frame_host/ancestor_throttle.cc b/content/browser/frame_host/ancestor_throttle.cc
index 8f52434d6ed4465089e8e2710a2115d0b4b4531a..0bb5531d20e23f4b1bad4fa1c6b9dcee4503d063 100644
--- a/content/browser/frame_host/ancestor_throttle.cc
+++ b/content/browser/frame_host/ancestor_throttle.cc
@@ -105,6 +105,11 @@ AncestorThrottle::WillProcessResponse() {
NavigationHandleImpl* handle =
static_cast<NavigationHandleImpl*>(navigation_handle());
+ // Downloads should be exempt from checking for X-Frame-Options, so
+ // proceed if this is a download.
+ if (handle->is_download())
+ return NavigationThrottle::PROCEED;
+
std::string header_value;
HeaderDisposition disposition =
ParseHeader(handle->GetResponseHeaders(), &header_value);

Powered by Google App Engine
This is Rietveld 408576698