Index: Source/modules/serviceworkers/FetchHeaderList.cpp |
diff --git a/Source/modules/serviceworkers/FetchHeaderList.cpp b/Source/modules/serviceworkers/FetchHeaderList.cpp |
index ec5702314a7a46d484756affbbcaa14f86009d67..a0e0389e97fa7042521f44aa740185c0e92e7b29 100644 |
--- a/Source/modules/serviceworkers/FetchHeaderList.cpp |
+++ b/Source/modules/serviceworkers/FetchHeaderList.cpp |
@@ -17,6 +17,15 @@ PassRefPtr<FetchHeaderList> FetchHeaderList::create() |
return adoptRef(new FetchHeaderList()); |
} |
+PassRefPtr<FetchHeaderList> FetchHeaderList::createCopy() |
+{ |
+ RefPtr<FetchHeaderList> list(create()); |
+ for (size_t i = 0; i < m_headerList.size(); ++i) { |
+ list->append(m_headerList[i]->first, m_headerList[i]->second); |
+ } |
+ return list.release(); |
+} |
+ |
FetchHeaderList::FetchHeaderList() |
{ |
} |
@@ -151,7 +160,7 @@ bool FetchHeaderList::isForbiddenHeaderName(const String& name) |
// `Transfer-Encoding`, `Upgrade`, `User-Agent`, `Via` |
// or starts with `Proxy-` or `Sec-` (including when it is just `Proxy-` or |
// `Sec-`)." |
- return !XMLHttpRequest::isAllowedHTTPHeader(name); |
+ return !XMLHttpRequest::isAllowedHTTPHeader(name) || equalIgnoringCase(name, "DNT"); |
} |
bool FetchHeaderList::isForbiddenResponseHeaderName(const String& name) |