Bug 98393 - [WebSocket] Update compression extension
Summary: [WebSocket] Update compression extension
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kenichi Ishibashi
URL:
Keywords:
Depends on: 98475 98840 98872
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-04 03:01 PDT by Kenichi Ishibashi
Modified: 2016-05-18 21:01 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenichi Ishibashi 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.
Comment 1 Yuta Kitamura 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.)
Comment 2 Kenichi Ishibashi 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