2009-12-07 Fumitoshi Ukai <ukai@chromium.org>
authorukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Dec 2009 04:03:42 +0000 (04:03 +0000)
committerukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Dec 2009 04:03:42 +0000 (04:03 +0000)
commit20fb8b76757ce4c7a7157ac633fedb2539cca2bb
tree420698241f9b7d42c8f5464c23a7ef76cb5af098
parent0751f195c0beacce5f9fe2b38ff505f4b4d4931e
2009-12-07  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Darin Adler.

        Fix wrong length parsing in WebSocket.
        https://bugs.webkit.org/show_bug.cgi?id=32203

        These two tests assumed wrong length encoding in frame: it parsed
        length from bytes with 8th bit on.  But spec says length is encoded
        as a series of 7-bit bytes stored in octests with the 8th bit on
        *but the last byte*.
        These tests encodes a frame that has 129 length, so it must be
        \x81\0x01 instead of \x81\0x81.

        * websocket/tests/frame-length-longer-than-buffer_wsh.py:
        * websocket/tests/frame-length-skip_wsh.py:
2009-12-07  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Darin Adler.

        Fix wrong length parsing in WebSocket.
        https://bugs.webkit.org/show_bug.cgi?id=32203

        * websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::didReceiveData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/websocket/tests/frame-length-longer-than-buffer_wsh.py
LayoutTests/websocket/tests/frame-length-skip_wsh.py
WebCore/ChangeLog
WebCore/websockets/WebSocketChannel.cpp