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

Unified Diff: Source/platform/network/WebSocketHandshakeRequest.cpp

Issue 130863002: [WebSocket] Merge duplicated HTTP headers for devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a platform dependent test Created 6 years, 11 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: Source/platform/network/WebSocketHandshakeRequest.cpp
diff --git a/Source/platform/network/WebSocketHandshakeRequest.cpp b/Source/platform/network/WebSocketHandshakeRequest.cpp
index 1cc3f1473210654fed1406a97724fb62b3cb3777..902be3becf8329ae87d8168d2a2d535cfca05ef5 100644
--- a/Source/platform/network/WebSocketHandshakeRequest.cpp
+++ b/Source/platform/network/WebSocketHandshakeRequest.cpp
@@ -47,4 +47,13 @@ WebSocketHandshakeRequest::~WebSocketHandshakeRequest()
{
}
+void WebSocketHandshakeRequest::addAndMergeHeader(HTTPHeaderMap* map, const AtomicString& name, const AtomicString& value)
+{
+ HTTPHeaderMap::AddResult result = map->add(name, value);
+ if (!result.isNewEntry) {
+ // Inspector expects the "\n" separated format.
+ result.iterator->value = result.iterator->value + "\n" + String(value);
+ }
+}
+
} // namespace WebCore
« no previous file with comments | « Source/platform/network/WebSocketHandshakeRequest.h ('k') | Source/platform/network/WebSocketHandshakeResponse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698