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

Unified Diff: third_party/WebKit/Source/modules/fetch/Response.cpp

Issue 1965013002: Implement headers attributes in ForeignFetchResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using instead of typedef Created 4 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: third_party/WebKit/Source/modules/fetch/Response.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index d7cd79e81573daedfa3230b86f1d984e438e18ac..a03eb6d110d6cd19a4fdfdc80e3f10985a2ff811 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -59,9 +59,13 @@ FetchResponseData* createFetchResponseDataFromWebResponse(ScriptState* scriptSta
case WebServiceWorkerResponseTypeBasic:
response = response->createBasicFilteredResponse();
break;
- case WebServiceWorkerResponseTypeCORS:
- response = response->createCORSFilteredResponse();
+ case WebServiceWorkerResponseTypeCORS: {
+ HTTPHeaderSet headerNames;
+ for (const auto& header : webResponse.corsExposedHeaderNames())
+ headerNames.add(String(header));
+ response = response->createCORSFilteredResponse(headerNames);
break;
+ }
case WebServiceWorkerResponseTypeOpaque:
response = response->createOpaqueFilteredResponse();
break;

Powered by Google App Engine
This is Rietveld 408576698