RESOLVED FIXED Bug 65592
WebSocket could not handle zero length text frame.
https://bugs.webkit.org/show_bug.cgi?id=65592
Summary WebSocket could not handle zero length text frame.
Takashi Toyoshima
Reported 2011-08-02 21:08:57 PDT
In current implement, WebSocket cause UTF-8 decode frame error on zero length text frame. cf.) Chromium side issue report: http://code.google.com/p/chromium/issues/detail?id=91193
Attachments
Patch (7.81 KB, patch)
2011-08-02 21:13 PDT, Takashi Toyoshima
no flags
Patch (8.07 KB, patch)
2011-08-02 22:33 PDT, Takashi Toyoshima
no flags
Takashi Toyoshima
Comment 1 2011-08-02 21:13:21 PDT
Kent Tamura
Comment 2 2011-08-02 21:17:16 PDT
Comment on attachment 102737 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102737&action=review > Source/WebCore/websockets/WebSocketChannel.cpp:560 > String message = String::fromUTF8(continuousFrameData.data(), continuousFrameData.size()); > - if (message.isNull()) > + if (message.isNull() && continuousFrameData.size()) Can we avoid String::fromUTF8() when continuousFrameData.size() == 0? > Source/WebCore/websockets/WebSocketChannel.cpp:575 > String message = String::fromUTF8(frame.payload, frame.payloadLength); > skipBuffer(frame.frameEnd - m_buffer); > - if (message.isNull()) > + if (message.isNull() && frame.payloadLength) ditto.
Takashi Toyoshima
Comment 3 2011-08-02 22:33:24 PDT
Kent Tamura
Comment 4 2011-08-02 22:53:32 PDT
Comment on attachment 102740 [details] Patch ok
WebKit Review Bot
Comment 5 2011-08-03 00:07:09 PDT
Comment on attachment 102740 [details] Patch Clearing flags on attachment: 102740 Committed r92262: <http://trac.webkit.org/changeset/92262>
WebKit Review Bot
Comment 6 2011-08-03 00:07:14 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.