2010-01-14 Yuzo Fujishima <yuzo@google.com>
[WebKit-https.git] / WebKitTools / pywebsocket / mod_pywebsocket / handshake.py
index 14d5afc..50d8c80 100644 (file)
@@ -63,17 +63,15 @@ _FIRST_FIVE_LINES = map(re.compile, [
     r'^Origin: [\S]+\r\n$',
 ])
 
-# FIXME: Cookie headers also being in restricted WebSocket syntax.
 _SIXTH_AND_LATER = re.compile(
     r'^'
     r'(WebSocket-Protocol: [\x20-\x7e]+\r\n)?'
-    r'([Cc][Oo][Oo][Kk][Ii][Ee]:[^\r]*\r\n)*'
-    r'([Cc][Oo][Oo][Kk][Ii][Ee]2:[^\r]*\r\n)?'
-    r'([Cc][Oo][Oo][Kk][Ii][Ee]:[^\r]*\r\n)*'
+    r'(Cookie: [^\r]*\r\n)*'
+    r'(Cookie2: [^\r]*\r\n)?'
+    r'(Cookie: [^\r]*\r\n)*'
     r'\r\n')
 
 
-
 def _default_port(is_secure):
     if is_secure:
         return _DEFAULT_WEB_SOCKET_SECURE_PORT