Bug 98393
Summary: | [WebSocket] Update compression extension | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kenichi Ishibashi <bashi> |
Component: | WebCore Misc. | Assignee: | Kenichi Ishibashi <bashi> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, bfulgham, wilander, yutak |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 98475, 98840, 98872 | ||
Bug Blocks: |
Kenichi Ishibashi
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Yuta Kitamura
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
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