2009-12-16 Fumitoshi Ukai <ukai@chromium.org>
authorukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Dec 2009 06:19:05 +0000 (06:19 +0000)
committerukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Dec 2009 06:19:05 +0000 (06:19 +0000)
commitafb12a6181898aba81deb9221b6fde9f6c2a8557
tree5ec9292a8827df721911477c0bb5082466df0e1a
parent9e70c8f31ea0f5eedbca8ff8d1fb3f3870fde8dd
2009-12-16  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Fix flakiness in WebSocket handshake console message.
        https://bugs.webkit.org/show_bug.cgi?id=32598

        In chromium, LayoutTests/websocket/tests/handshake-error.html is
        flaky, because it outputs the following console message several times:
          CONSOLE MESSAGE: line 0: Unexpected response code:101
        Update m_mode in WebSocketHandshake correctly: Once it finds
        error in handshake message, set m_mode to Failed and don't try
        reading handshake message again.  If handshake message is not yet
        fully received, set m_mode to Incomplete, so next didReceiveData()
        will try to check handshake message again.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@52234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/websockets/WebSocketChannel.cpp
WebCore/websockets/WebSocketHandshake.cpp