Title: [97249] trunk/Source/WebCore
Revision
97249
Author
[email protected]
Date
2011-10-12 02:41:06 -0700 (Wed, 12 Oct 2011)

Log Message

WebSocket: Update WebSocket protocol to hybi-17
https://bugs.webkit.org/show_bug.cgi?id=69910

Reviewed by Kent Tamura.

Essential changes between hybi-10 and hybi-17 are:
- Sec-WebSocket-Origin header has been renamed to "Origin".
- Sec-WebSocket-Version header value has been bumped to 13.

No new tests are necessary. pywebsocket has already been updated to the latest version
which understands the new protocol. Tests under http/tests/websocket/ should keep
passing.

* websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeMessage):
(WebCore::WebSocketHandshake::clientHandshakeRequest):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (97248 => 97249)


--- trunk/Source/WebCore/ChangeLog	2011-10-12 09:20:45 UTC (rev 97248)
+++ trunk/Source/WebCore/ChangeLog	2011-10-12 09:41:06 UTC (rev 97249)
@@ -1,3 +1,22 @@
+2011-10-12  Yuta Kitamura  <[email protected]>
+
+        WebSocket: Update WebSocket protocol to hybi-17
+        https://bugs.webkit.org/show_bug.cgi?id=69910
+
+        Reviewed by Kent Tamura.
+
+        Essential changes between hybi-10 and hybi-17 are:
+        - Sec-WebSocket-Origin header has been renamed to "Origin".
+        - Sec-WebSocket-Version header value has been bumped to 13.
+
+        No new tests are necessary. pywebsocket has already been updated to the latest version
+        which understands the new protocol. Tests under http/tests/websocket/ should keep
+        passing.
+
+        * websockets/WebSocketHandshake.cpp:
+        (WebCore::WebSocketHandshake::clientHandshakeMessage):
+        (WebCore::WebSocketHandshake::clientHandshakeRequest):
+
 2011-10-11  Antti Koivisto  <[email protected]>
 
         Resolve regular and visited link style in a single pass

Modified: trunk/Source/WebCore/websockets/WebSocketHandshake.cpp (97248 => 97249)


--- trunk/Source/WebCore/websockets/WebSocketHandshake.cpp	2011-10-12 09:20:45 UTC (rev 97248)
+++ trunk/Source/WebCore/websockets/WebSocketHandshake.cpp	2011-10-12 09:41:06 UTC (rev 97249)
@@ -268,10 +268,7 @@
         fields.append("Upgrade: websocket");
     fields.append("Connection: Upgrade");
     fields.append("Host: " + hostName(m_url, m_secure));
-    if (m_useHixie76Protocol)
-        fields.append("Origin: " + clientOrigin());
-    else
-        fields.append("Sec-WebSocket-Origin: " + clientOrigin());
+    fields.append("Origin: " + clientOrigin());
     if (!m_clientProtocol.isEmpty())
         fields.append("Sec-WebSocket-Protocol: " + m_clientProtocol);
 
@@ -289,7 +286,7 @@
         fields.append("Sec-WebSocket-Key2: " + m_hixie76SecWebSocketKey2);
     } else {
         fields.append("Sec-WebSocket-Key: " + m_secWebSocketKey);
-        fields.append("Sec-WebSocket-Version: 8");
+        fields.append("Sec-WebSocket-Version: 13");
     }
 
     // Fields in the handshake are sent by the client in a random order; the
@@ -327,10 +324,7 @@
         request.addHeaderField("Upgrade", "websocket");
     request.addHeaderField("Connection", "Upgrade");
     request.addHeaderField("Host", hostName(m_url, m_secure));
-    if (m_useHixie76Protocol)
-        request.addHeaderField("Origin", clientOrigin());
-    else
-        request.addHeaderField("Sec-WebSocket-Origin", clientOrigin());
+    request.addHeaderField("Origin", clientOrigin());
     if (!m_clientProtocol.isEmpty())
         request.addHeaderField("Sec-WebSocket-Protocol:", m_clientProtocol);
 
@@ -349,7 +343,7 @@
         request.setKey3(m_hixie76Key3);
     } else {
         request.addHeaderField("Sec-WebSocket-Key", m_secWebSocketKey);
-        request.addHeaderField("Sec-WebSocket-Version", "8");
+        request.addHeaderField("Sec-WebSocket-Version", "13");
     }
 
     return request;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to