NEW 98393
[WebSocket] Update compression extension
https://bugs.webkit.org/show_bug.cgi?id=98393
Summary [WebSocket] Update compression extension
Kenichi Ishibashi
Reported 2012-10-04 03:01:17 PDT
We implemented WebSocket compression extension based on http://tools.ietf.org/html/draft-ietf-hybi-websocket-perframe-compression-04. The hybi working group has been revising the draft specification. The current draft spec is http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-01. There are some differences between our current implementation and the draft spec. Here is a summary: - Compression now applies per-message. In the old spec, compression applies per-frame. - "method" extension parameter is added. This parameter must be included in Sec-WebSocket-Extension header if a client(browser) want to use it. The parameter is used to determine compression algorithm. - The current draft spec defines DEFLATE compression method. This is almost the same of what we implemented except for compression unit (per-message vs per-frame). I'd like to make the current implementation be up-to-date. I'll start implementation if there is no objection.
Attachments
Yuta Kitamura
Comment 1 2012-10-04 03:19:21 PDT
I'm fine with the change for the following reasons. - The perframe spec is abondoned and superseded with the permessage spec. - Extension name will change, so servers accepting our current compression will naturally fall back to plain WebSocket. So the compatiblity impact of the migration will be minimum. - Our current implementation is in an experimental state and has vendor-prefixed extension name. (I assume the new permessage implementation is going to have a vendor-prefix, too.)
Kenichi Ishibashi
Comment 2 2012-10-09 18:22:25 PDT
I'd like to take following approach to update compression extension. (1) Update pywebsocket to the newest. (I'm fixing some bugs in pywebsocket) (2) Add an WebSocketExtensionProcessor which handles "permessage-compress" extension. The extension name will be vendor-prefixed like "x-webkit-permessage-compress". (3) Switch "x-webkit-perframe-deflate" to "x-webkit-permessage-compress" and remove/add/update tests and test expectations. (4) Remove WebSocketDeflateFramer
Note You need to log in before you can comment on or make changes to this bug.