RESOLVED WONTFIX 35571
WebSocket bufferedAmount doesn't include framing overhead
https://bugs.webkit.org/show_bug.cgi?id=35571
Summary WebSocket bufferedAmount doesn't include framing overhead
Fumitoshi Ukai
Reported 2010-03-02 03:08:27 PST
WebSocket spec draft says WebSocket bufferedAmount doesn't include framing overhead incurred by the protocol. http://lists.whatwg.org/pipermail/commit-watchers-whatwg.org/2010/003971.html
Attachments
Patch (4.65 KB, patch)
2010-03-02 20:53 PST, Fumitoshi Ukai
no flags
Patch (10.32 KB, patch)
2010-03-05 02:15 PST, Fumitoshi Ukai
no flags
Fumitoshi Ukai
Comment 1 2010-03-02 20:53:56 PST
Alexey Proskuryakov
Comment 2 2010-03-03 14:20:14 PST
Comment on attachment 49876 [details] Patch Isn't 0x00 allowed to be inside of message text? 0xff can never occur in UTF-8, but 0x00 can be there. It seems that if bufferedAmount() is going to parse the buffer, then it should have a state machine, and also ASSERT that it knows about the current frame type. I don't know how to reasonably implement that, since the buffer won't necessarily start on frame boundary. But also, this seems quite slow, perhaps it would be better to store data size separately (again, it can be a challenge to update properly). Or even to try and get the spec changed back per implementor feedback. Do we have a test checking how null characters go over WebSocket?
Fumitoshi Ukai
Comment 3 2010-03-03 18:41:34 PST
(In reply to comment #2) > (From update of attachment 49876 [details]) > Isn't 0x00 allowed to be inside of message text? 0xff can never occur in UTF-8, > but 0x00 can be there. Oh, i missed that case. > It seems that if bufferedAmount() is going to parse the buffer, then it should > have a state machine, and also ASSERT that it knows about the current frame > type. I don't know how to reasonably implement that, since the buffer won't > necessarily start on frame boundary. > > But also, this seems quite slow, perhaps it would be better to store data size > separately (again, it can be a challenge to update properly). Or even to try > and get the spec changed back per implementor feedback. Yes, I prefer previous spec. I'll ask the spec changed back. > Do we have a test checking how null characters go over WebSocket? Not yet. I'll add.
Fumitoshi Ukai
Comment 4 2010-03-05 02:15:02 PST
Alexey Proskuryakov
Comment 5 2010-03-05 12:25:57 PST
I'm not sure if we want to make this change even if we can't get the spec changed back.
Alexey Proskuryakov
Comment 6 2010-03-29 14:48:41 PDT
Comment on attachment 50093 [details] Patch This doesn't currently need review, removing the flag. The behavior of bufferedAmount is still being actively discussed on whatwg mailing list.
Takeshi Yoshino
Comment 7 2013-04-08 23:03:20 PDT
The patch is obsolete (for Hixie 75 style framing). Needs discussion on the spec. Maybe reopening https://www.w3.org/Bugs/Public/show_bug.cgi?id=9083 if necessary. Marking this bug as WONTFIX for now.
Note You need to log in before you can comment on or make changes to this bug.