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

Unified Diff: net/websockets/websocket_test_util.cc

Issue 863253002: Update from https://crrev.com/312600 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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: net/websockets/websocket_test_util.cc
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc
index 65613b54dd8c5edb77e8c4301b1cbf455d0fda19..6091c9e0be16a1a95d48e2c7cb7ba5f37b41eda7 100644
--- a/net/websockets/websocket_test_util.cc
+++ b/net/websockets/websocket_test_util.cc
@@ -33,6 +33,7 @@ uint32 LinearCongruentialGenerator::Generate() {
}
std::string WebSocketStandardRequest(const std::string& path,
+ const std::string& host,
const std::string& origin,
const std::string& extra_headers) {
// Unrelated changes in net/http may change the order and default-values of
@@ -40,7 +41,7 @@ std::string WebSocketStandardRequest(const std::string& path,
// string in that case.
return base::StringPrintf(
"GET %s HTTP/1.1\r\n"
- "Host: localhost\r\n"
+ "Host: %s\r\n"
"Connection: Upgrade\r\n"
"Pragma: no-cache\r\n"
"Cache-Control: no-cache\r\n"
@@ -53,9 +54,7 @@ std::string WebSocketStandardRequest(const std::string& path,
"Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n"
"Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n"
"%s\r\n",
- path.c_str(),
- origin.c_str(),
- extra_headers.c_str());
+ path.c_str(), host.c_str(), origin.c_str(), extra_headers.c_str());
}
std::string WebSocketStandardResponse(const std::string& extra_headers) {

Powered by Google App Engine
This is Rietveld 408576698