summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 10:27:26 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 10:27:26 +0000
commit3e821c4c2b13492e88462a7df1b2dd4d4b962896 (patch)
treeaf1f39ab2c4455db30663e46471f72db384a03bd /net/websockets
parent9c2b65c90863f3623759cbd05b75dce2482f34cd (diff)
downloadchromium_src-3e821c4c2b13492e88462a7df1b2dd4d4b962896.zip
chromium_src-3e821c4c2b13492e88462a7df1b2dd4d4b962896.tar.gz
chromium_src-3e821c4c2b13492e88462a7df1b2dd4d4b962896.tar.bz2
Fix kServerHandshakeHeader
BUG=none TEST=net_unittests passes Review URL: http://codereview.chromium.org/355039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket.cc2
-rw-r--r--net/websockets/websocket_unittest.cc16
2 files changed, 9 insertions, 9 deletions
diff --git a/net/websockets/websocket.cc b/net/websockets/websocket.cc
index 2d7169d..0ccce69 100644
--- a/net/websockets/websocket.cc
+++ b/net/websockets/websocket.cc
@@ -17,7 +17,7 @@ static const int kWebSocketPort = 80;
static const int kSecureWebSocketPort = 443;
static const char kServerHandshakeHeader[] =
- "HTTP/1.1 101 Web Socket Protocol\r\n";
+ "HTTP/1.1 101 Web Socket Protocol Handshake\r\n";
static const size_t kServerHandshakeHeaderLength =
sizeof(kServerHandshakeHeader) - 1;
diff --git a/net/websockets/websocket_unittest.cc b/net/websockets/websocket_unittest.cc
index 907f62a..6157271 100644
--- a/net/websockets/websocket_unittest.cc
+++ b/net/websockets/websocket_unittest.cc
@@ -128,7 +128,7 @@ class WebSocketTest : public PlatformTest {
TEST_F(WebSocketTest, Connect) {
MockClientSocketFactory mock_socket_factory;
MockRead data_reads[] = {
- MockRead("HTTP/1.1 101 Web Socket Protocol\r\n"
+ MockRead("HTTP/1.1 101 Web Socket Protocol Handshake\r\n"
"Upgrade: WebSocket\r\n"
"Connection: Upgrade\r\n"
"WebSocket-Origin: http://example.com\r\n"
@@ -187,13 +187,13 @@ TEST_F(WebSocketTest, ServerSentData) {
static const char kFrame[] = "\x00Hello\xff";
static const int kFrameLen = sizeof(kFrame) - 1;
MockRead data_reads[] = {
- MockRead("HTTP/1.1 101 Web Socket Protocol\r\n"
- "Upgrade: WebSocket\r\n"
- "Connection: Upgrade\r\n"
- "WebSocket-Origin: http://example.com\r\n"
- "WebSocket-Location: ws://example.com/demo\r\n"
- "WebSocket-Protocol: sample\r\n"
- "\r\n"),
+ MockRead("HTTP/1.1 101 Web Socket Protocol Handshake\r\n"
+ "Upgrade: WebSocket\r\n"
+ "Connection: Upgrade\r\n"
+ "WebSocket-Origin: http://example.com\r\n"
+ "WebSocket-Location: ws://example.com/demo\r\n"
+ "WebSocket-Protocol: sample\r\n"
+ "\r\n"),
MockRead(true, kFrame, kFrameLen),
// Server doesn't close the connection after handshake.
MockRead(true, ERR_IO_PENDING),