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

Unified Diff: third_party/WebKit/Source/core/page/EventSource.cpp

Issue 1749153002: CORS-RFC1918: Teach ResourceRequest about "external" requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jochen's feedback. Created 4 years, 10 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: third_party/WebKit/Source/core/page/EventSource.cpp
diff --git a/third_party/WebKit/Source/core/page/EventSource.cpp b/third_party/WebKit/Source/core/page/EventSource.cpp
index 6f5f3f83bd1b13d13b89cfca00b8f18deba3fca7..cf342912299860176b78f57bbbe48a15d5e8b425 100644
--- a/third_party/WebKit/Source/core/page/EventSource.cpp
+++ b/third_party/WebKit/Source/core/page/EventSource.cpp
@@ -121,6 +121,7 @@ void EventSource::connect()
request.setHTTPHeaderField(HTTPNames::Accept, "text/event-stream");
request.setHTTPHeaderField(HTTPNames::Cache_Control, "no-cache");
request.setRequestContext(WebURLRequest::RequestContextEventSource);
+ request.setExternalRequestStateFromRequestorAddressSpace(executionContext.securityContext().addressSpace());
if (m_parser && !m_parser->lastEventId().isEmpty()) {
// HTTP headers are Latin-1 byte strings, but the Last-Event-ID header is encoded as UTF-8.
// TODO(davidben): This should be captured in the type of setHTTPHeaderField's arguments.

Powered by Google App Engine
This is Rietveld 408576698