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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 343273005: Set an empty HTTP origin header if needed in RenderFrame::willSendRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 92e7367871040aa18c6a4c27ab77a3ff6f68fbff..be10babf0f58a6e806dbb782e5a0f370020ffd05 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2418,6 +2418,10 @@ void RenderFrameImpl::willSendRequest(
WebString::fromUTF8(kDefaultAcceptHeader));
}
+ // Add an empty HTTP origin header for non GET methods if none is currently
+ // present.
+ request.addHTTPOriginIfNeeded(WebString());
+
// Attach |should_replace_current_entry| state to requests so that, should
// this navigation later require a request transfer, all state is preserved
// when it is re-created in the new process.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698