Changeset 53317 in webkit


Ignore:
Timestamp:
Jan 14, 2010 8:56:47 PM (14 years ago)
Author:
ukai@chromium.org
Message:

2010-01-14 Yuzo Fujishima <yuzo@google.com>

Reviewed by Alexey Proskuryakov.

Update pywebsocket to 0.4.6
https://bugs.webkit.org/show_bug.cgi?id=32299
The newer pywebsocket can handle more simultaneous connections.

  • pywebsocket/mod_pywebsocket/handshake.py:
  • pywebsocket/mod_pywebsocket/standalone.py:
  • pywebsocket/setup.py:
  • pywebsocket/test/test_handshake.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r53298 r53317  
     12010-01-14  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Update pywebsocket to 0.4.6
     6        https://bugs.webkit.org/show_bug.cgi?id=32299
     7        The newer pywebsocket can handle more simultaneous connections.
     8
     9        * pywebsocket/mod_pywebsocket/handshake.py:
     10        * pywebsocket/mod_pywebsocket/standalone.py:
     11        * pywebsocket/setup.py:
     12        * pywebsocket/test/test_handshake.py:
     13
    1142010-01-14  Eric Seidel  <eric@webkit.org>
    215
  • trunk/WebKitTools/pywebsocket/mod_pywebsocket/handshake.py

    r52296 r53317  
    6464])
    6565
    66 # FIXME: Cookie headers also being in restricted WebSocket syntax.
    6766_SIXTH_AND_LATER = re.compile(
    6867    r'^'
    6968    r'(WebSocket-Protocol: [\x20-\x7e]+\r\n)?'
    70     r'([Cc][Oo][Oo][Kk][Ii][Ee]:[^\r]*\r\n)*'
    71     r'([Cc][Oo][Oo][Kk][Ii][Ee]2:[^\r]*\r\n)?'
    72     r'([Cc][Oo][Oo][Kk][Ii][Ee]:[^\r]*\r\n)*'
     69    r'(Cookie: [^\r]*\r\n)*'
     70    r'(Cookie2: [^\r]*\r\n)?'
     71    r'(Cookie: [^\r]*\r\n)*'
    7372    r'\r\n')
    74 
    7573
    7674
  • trunk/WebKitTools/pywebsocket/mod_pywebsocket/standalone.py

    r52296 r53317  
    8989_DEFAULT_LOG_MAX_BYTES = 1024 * 256
    9090_DEFAULT_LOG_BACKUP_COUNT = 5
     91
     92_DEFAULT_REQUEST_QUEUE_SIZE = 128
    9193
    9294# 1024 is practically large enough to contain WebSocket handshake lines.
     
    315317    parser.add_option('--strict', dest='strict', action='store_true',
    316318                      default=False, help='Strictly check handshake request')
     319    parser.add_option('-q', '--queue', dest='request_queue_size', type='int',
     320                      default=_DEFAULT_REQUEST_QUEUE_SIZE,
     321                      help='request queue size')
    317322    options = parser.parse_args()[0]
    318323
     
    320325
    321326    _configure_logging(options)
     327
     328    SocketServer.TCPServer.request_queue_size = options.request_queue_size
    322329
    323330    if options.use_tls:
  • trunk/WebKitTools/pywebsocket/setup.py

    r52296 r53317  
    5757      packages=[_PACKAGE_NAME],
    5858      url='http://code.google.com/p/pywebsocket/',
    59       version='0.4.5',
     59      version='0.4.6',
    6060      )
    6161
  • trunk/WebKitTools/pywebsocket/test/test_handshake.py

    r52296 r53317  
    349349        '\r\n',
    350350    ),
     351    (  # Wrong-case cookie
     352        'GET /demo HTTP/1.1\r\n',
     353        'Upgrade: WebSocket\r\n',
     354        'Connection: Upgrade\r\n',
     355        'Host: example.com\r\n',
     356        'Origin: http://example.com\r\n',
     357        'cookie: abc/xyz\r\n'
     358        '\r\n',
     359    ),
     360    (  # Cookie, no space after colon
     361        'GET /demo HTTP/1.1\r\n',
     362        'Upgrade: WebSocket\r\n',
     363        'Connection: Upgrade\r\n',
     364        'Host: example.com\r\n',
     365        'Origin: http://example.com\r\n',
     366        'Cookie:abc/xyz\r\n'
     367        '\r\n',
     368    ),
    351369)
    352370
Note: See TracChangeset for help on using the changeset viewer.