draft-ietf-hybi-permessage-compression-06.txt   draft-ietf-hybi-permessage-compression-07.txt 
HyBi Working Group T. Yoshino HyBi Working Group T. Yoshino
Internet-Draft Google, Inc. Internet-Draft Google, Inc.
Intended status: Standards Track March 13, 2013 Intended status: Standards Track March 19, 2013
Expires: September 14, 2013 Expires: September 20, 2013
Compression Extensions for WebSocket Compression Extensions for WebSocket
draft-ietf-hybi-permessage-compression-06 draft-ietf-hybi-permessage-compression-07
Abstract Abstract
This document specifies a framework for creating WebSocket extensions This document specifies a framework for creating WebSocket extensions
that add compression functionality to the WebSocket Protocol. that add compression functionality to the WebSocket Protocol. An
Extensions based on this framework compress the payload data portion extension based on this framework compresses the payload data portion
of non-control WebSocket messages on per-message basis using a of non-control WebSocket messages on per-message basis using
specified compression algorithm. One reserved bit RSV1 in the parameters negotiated during the opening handshake. This framework
WebSocket frame header is allocated to control application of provides a general method to apply a compression algorithm to the
compression for each message. This document also specifies one contents of WebSocket messages. For each compression algorithm, an
extension is defined by specifying parameter negotiation and
compression algorithm in detail. This document also specifies one
specific compression extension using the DEFLATE algorithm. specific compression extension using the DEFLATE algorithm.
Please send feedback to the hybi@ietf.org mailing list. Please send feedback to the hybi@ietf.org mailing list.
Status of this Memo Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current. Drafts is at http://datatracker.ietf.org/drafts/current.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 14, 2013. This Internet-Draft will expire on September 20, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 16 skipping to change at page 2, line 18
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conformance Requirements and Terminology . . . . . . . . . . . 4 2. Conformance Requirements and Terminology . . . . . . . . . . . 4
3. WebSocket Per-message Compression Extension . . . . . . . . . 5 3. WebSocket Per-message Compression Extension . . . . . . . . . 5
4. Extension Negotiation . . . . . . . . . . . . . . . . . . . . 6 4. Extension Negotiation . . . . . . . . . . . . . . . . . . . . 6
4.1. Negotiation Examples . . . . . . . . . . . . . . . . . . . 6 4.1. Negotiation Examples . . . . . . . . . . . . . . . . . . . 7
5. Framing . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 5. Framing . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1. Sending . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1. Sending . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.2. Receiving . . . . . . . . . . . . . . . . . . . . . . . . 8 5.2. Receiving . . . . . . . . . . . . . . . . . . . . . . . . 9
6. permessage-deflate extension . . . . . . . . . . . . . . . . . 9 6. permessage-deflate extension . . . . . . . . . . . . . . . . . 10
6.1. Method Parameters . . . . . . . . . . . . . . . . . . . . 10 6.1. Method Parameters . . . . . . . . . . . . . . . . . . . . 11
6.1.1. Context Takeover Control . . . . . . . . . . . . . . . 10 6.1.1. Context Takeover Control . . . . . . . . . . . . . . . 11
6.1.2. Limiting the LZ77 sliding window size . . . . . . . . 10 6.1.2. Limiting the LZ77 sliding window size . . . . . . . . 11
6.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 11 6.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 12
6.2. Payload Data Transformation . . . . . . . . . . . . . . . 12 6.2. Payload Data Transformation . . . . . . . . . . . . . . . 13
6.2.1. Compression . . . . . . . . . . . . . . . . . . . . . 12 6.2.1. Compression . . . . . . . . . . . . . . . . . . . . . 13
6.2.2. Decompression . . . . . . . . . . . . . . . . . . . . 13 6.2.2. Decompression . . . . . . . . . . . . . . . . . . . . 14
6.2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 14 6.2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 15
6.3. Intermediaries . . . . . . . . . . . . . . . . . . . . . . 17 6.3. Intermediaries . . . . . . . . . . . . . . . . . . . . . . 18
6.4. Implementation Notes . . . . . . . . . . . . . . . . . . . 17 6.4. Implementation Notes . . . . . . . . . . . . . . . . . . . 18
7. Security Considerations . . . . . . . . . . . . . . . . . . . 18 7. Security Considerations . . . . . . . . . . . . . . . . . . . 19
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
8.1. Registration of the "permessage-deflate" WebSocket 8.1. Registration of the "permessage-deflate" WebSocket
Extension Name . . . . . . . . . . . . . . . . . . . . . . 19 Extension Name . . . . . . . . . . . . . . . . . . . . . . 20
8.2. Registration of the "Per-message Compressed" WebSocket 8.2. Registration of the "Per-message Compressed" WebSocket
Framing Header Bit . . . . . . . . . . . . . . . . . . . . 19 Framing Header Bit . . . . . . . . . . . . . . . . . . . . 20
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 20 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 21
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22
10.1. Normative References . . . . . . . . . . . . . . . . . . . 21 10.1. Normative References . . . . . . . . . . . . . . . . . . . 22
10.2. Informative References . . . . . . . . . . . . . . . . . . 21 10.2. Informative References . . . . . . . . . . . . . . . . . . 22
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 23
1. Introduction 1. Introduction
This document specifies a framework to apply a compression algorithm This document specifies a framework to add compression functionality
to octets exchanged over the WebSocket Protocol [RFC6455]. This to the WebSocket Protocol [RFC6455]. This framework specifies how to
framework uses the extension concept for the WebSocket Protocol is define WebSocket Per-message Compression Extensions (PMCEs)
introduced in the Section 9 of [RFC6455]. By specifying basic individually for various compression algorithms based on the
extension negotiation process excluding algorithm specific extension extension concept of the WebSocket Protocol specified in Section 9 of
parameters in detail and a general method of transforming contents of [RFC6455]. A WebSocket client and a peer WebSocket server negotiate
WebSocket messages using a compression algorithm, this framework use of a PMCE and determines parameters to configure the compression
allows us to define WebSocket Per-message Compression Extensions algorithm during the WebSocket opening handshake. The client and
(PMCEs) to the WebSocket Protocol individually for various server then can exchange non-control messages using frames with
compression algorithms. A WebSocket client and a WebSocket server compressed data in the payload data portion. This framework
negotiate use of a PMCE and determines parameters to configure the specifies a general method to apply a compression algorithm to the
compression algorithm during the WebSocket opening handshake. The contents of WebSocket messages. A document specifying an individual
client and server then exchange non-control messages using frames PMCE describes how to negotiate configuration parameters for the
with compressed data in the payload data portion. Documents compression algorithm and how to transform (compress and decompress)
specifying individual PMCEs describe how to negotiate parameters and data in the payload data portion in detail. A WebSocket client may
how to transform octets in the payload data portion. A WebSocket offer multiple PMCEs during the WebSocket opening handshake. A peer
client may offer multiple PMCEs during the WebSocket opening WebSocket server received those offers may choose and accept
handshake. The WebSocket server received those offers may choose and preferred one or decline all of them. PMCEs use the RSV1 bit of the
accept preferred one from them. PMCEs use the RSV1 bit of the WebSocket frame header to indicate whether a message is compressed or
WebSocket frame header to indicate whether the message is compressed not, so that an endpoint can choose not to compress messages with
or not, so that we can choose not to compress messages with
incompressible contents. incompressible contents.
This document also specifies one specific PMCE based on the DEFLATE This document also specifies one specific PMCE based on the DEFLATE
[RFC1951] algorithm. The extension name of the PMCE is "permessage- [RFC1951] algorithm. The extension name of the PMCE is "permessage-
deflate". We chose the DEFLATE since it's widely available as a deflate". We chose the DEFLATE since it's widely available as a
library on various platforms and the overhead of the DEFLATE is library on various platforms and the overhead of the DEFLATE is
small. To align the end of compressed data to octet boundary, this small. To align the end of compressed data to octet boundary, this
extension uses the algorithm described in the Section 2.1 of the PPP extension uses the algorithm described in Section 2.1 of the PPP
Deflate Protocol [RFC1979]. Endpoints can take over the LZ77 sliding Deflate Protocol [RFC1979]. Endpoints can take over the LZ77 sliding
window [LZ77] used to build frames for previous messages to get window [LZ77] used to build frames for previous messages to get
better compression ratio. For resource-limited devices, this better compression ratio. For resource-limited devices, this
extension provides parameters to limit memory usage for compression extension provides parameters to limit memory usage for compression
context. context.
2. Conformance Requirements and Terminology 2. Conformance Requirements and Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
skipping to change at page 4, line 23 skipping to change at page 4, line 23
steps") are to be interpreted with the meaning of the key word steps") are to be interpreted with the meaning of the key word
("MUST", "SHOULD", "MAY", etc.) used in introducing the algorithm. ("MUST", "SHOULD", "MAY", etc.) used in introducing the algorithm.
Conformance requirements phrased as algorithms or specific steps can Conformance requirements phrased as algorithms or specific steps can
be implemented in any manner, so long as the end result is be implemented in any manner, so long as the end result is
equivalent. In particular, the algorithms defined in this equivalent. In particular, the algorithms defined in this
specification are intended to be easy to understand and are not specification are intended to be easy to understand and are not
intended to be performant. intended to be performant.
This document references the procedure to _Fail the WebSocket This document references the procedure to _Fail the WebSocket
Connection_. This procedure is defined in the Section 7.1.7 of Connection_. This procedure is defined in Section 7.1.7 of
[RFC6455]. [RFC6455].
This document references the event that _the WebSocket Connection is This document references the event that _the WebSocket Connection is
established_. This event is defined in the Section 4.1 of [RFC6455]. established_ and the event that _A WebSocket Message Has Been
Received_. This event is defined in Section 4.1 of [RFC6455].
This document uses the Argumented Backus-Naur Form (ABNF) notation of This document uses the Argumented Backus-Naur Form (ABNF) notation of
[RFC5234]. The DIGIT (decimal 0-9) rule is included by reference, as [RFC5234]. The DIGIT (decimal 0-9) rule is included by reference, as
defined in the Appendix B.1 of [RFC5234]. defined in the Appendix B.1 of [RFC5234].
3. WebSocket Per-message Compression Extension 3. WebSocket Per-message Compression Extension
WebSocket Per-message Compression Extensions (PMCEs) are individually WebSocket Per-message Compression Extensions (PMCEs) are extensions
to the WebSocket Protocol enabling compression feature. PMCEs are
built based on Section 9 of [RFC6455]. PMCEs are individually
defined for various compression algorithms, and are registered in the defined for various compression algorithms, and are registered in the
WebSocket Extension Name Registry. Each PMCE refers to this WebSocket Extension Name Registry created in Section 11.4 of
framework and defines: [RFC6455]. Each PMCE refers to this framework and defines the
followings:
o The content to put in the "Sec-WebSocket-Extensions" header, o The content to put in the "Sec-WebSocket-Extensions" header. The
including the extension name of the PMCE and any applicable content includes the extension name of the PMCE and any applicable
extension parameters extension parameters.
o How to interpret extension parameters exchanged during the opening o How to interpret extension parameters exchanged during the opening
handshake handshake
o How to transform payload data portion of messages. o How to transform the payload data portion.
One such extension is defined in Section 6 of this document and is One such extension is defined in Section 6 of this document and is
registered in Section 8. Other PMCEs may be defined in other registered in Section 8. Other PMCEs may be defined in other
documents. documents.
PMCEs operate only on non-control messages.
This document allocates the RSV1 bit of the WebSocket header for
PMCEs, and calls the bit the "Per-message Compressed" bit. This bit
indicates whether the compression method is applied to the contents
of the message or not. An endpoint MUST NOT offer or accept use of
any other extension using the RSV1 bit together with a PMCE. The
"Per-message Compressed" bit MUST NOT be set on control frames and
non-first fragments of a data message. Messages with the
"Per-message Compressed" bit set (only on the first fragment if the
message is fragmented) are called "compressed messages" and have
compressed data in their payload data portion. Messages with the
"Per-message Compressed" bit unset are called "uncompressed messages"
and have uncompressed data in their payload data portion.
A server MUST NOT accept a PMCE offer together with a non-PMCE
extension if the PMCE will be applied to output of the non-PMCE and
any of the following conditions is met:
o Frame boundary of frames output by the non-PMCE extension needs to
be preserved.
o The non-PMCE uses the "Extension data" field or any of the
reserved bits on the WebSocket header as per-frame attribute.
Section 4 describes basic extension negotiation process. Section 5 Section 4 describes basic extension negotiation process. Section 5
describes how to apply the compression algorithm with negotiated describes how to apply the compression algorithm with negotiated
parameters to the contents of WebSocket messages. parameters to the contents of WebSocket messages.
4. Extension Negotiation 4. Extension Negotiation
To offer use of a PMCE, a client includes a To offer use of a PMCE, a client includes a
"Sec-WebSocket-Extensions" header element with the extension name of "Sec-WebSocket-Extensions" header element with the extension name of
the offered PMCE in the "Sec-WebSocket-Extensions" header in the the PMCE in the "Sec-WebSocket-Extensions" header in the client's
client's opening handshake of the WebSocket connection. Extension opening handshake of the WebSocket connection. Extension parameters
parameters in the element represent the PMCE offer in detail for in the element represent the PMCE offer in detail. For example, a
example by listing capability of the client and preferred values for client lists preferred configuration parameter values for the
the algorithm's configuration parameters to use. A client offers compression algorithm of the PMCE. A client offers multiple PMCE
multiple PMCE choices to the server by including multiple elements, choices to the server by including multiple elements in the
one for each PMCE offered. The set of elements MAY include multiple "Sec-WebSocket-Extensions" header, one for each PMCE offered. The
PMCEs with the same extension name to offer use of the same algorithm set of elements MAY include multiple PMCEs with the same extension
with different configurations. name to offer use of the same algorithm with different configuration
parameters.
To accept use of an offered PMCE, a server includes a To accept use of an offered PMCE, a server includes a
"Sec-WebSocket-Extensions" header element with the extension name of "Sec-WebSocket-Extensions" header element with the extension name of
the offered extension in the "Sec-WebSocket-Extensions" header in the the PMCE in the "Sec-WebSocket-Extensions" header in the server's
server's opening handshake of the WebSocket connection. Extension opening handshake of the WebSocket connection. Extension parameters
parameters in the element represent the configuration parameters of in the element represent the configuration parameters of the PMCE to
the PMCE to use in detail. The element MUST represent a PMCE that is use in detail. The element MUST represent a PMCE that is fully
fully supported by the server. The server rejects all offered PMCEs supported by the server.
by not including any element with PMCE names, in which case the
connection proceeds without Per-message Compression.
If the server responds with no PMCE element in the A server MUST NOT accept a PMCE offer together with any extension if
"Sec-WebSocket-Extensions" header and _the WebSocket Connection is the PMCE will conflict with the extension on use of the RSV1 bit. A
established_, both endpoints MUST proceed without Per-message client received a response accepting a PMCE offer together with such
Compression. If the server gives an invalid response, such as an extension MUST _Fail the WebSocket Connection_.
accepting a PMCE that the client did not offer, the client MUST _Fail
the WebSocket Connection_.
If the server responds with a valid PMCE element in the A server MUST NOT accept a PMCE offer together with any extension if
the PMCE will be applied to output of the extension and any of the
following conditions is met about the extension:
o The extension requires boundary of fragments to be preserved
between output from the extension at the sender and input to the
extension at the receiver.
o The extension uses the "Extension data" field or any of the
reserved bits on the WebSocket header as per-frame attribute.
A client received a response accepting a PMCE offer together with
such an extension MUST _Fail the WebSocket Connection_.
A server declines all offered PMCEs by not including any element with
PMCE names. If a server responds with no PMCE element in the
"Sec-WebSocket-Extensions" header, both endpoints proceed without
Per-message Compression once _the WebSocket Connection is
established_.
If a server gives an invalid response, such as accepting a PMCE that
the client did not offer, the client MUST _Fail the WebSocket
Connection_.
If a server responds with a valid PMCE element in the
"Sec-WebSocket-Extensions" header and _the WebSocket Connection is "Sec-WebSocket-Extensions" header and _the WebSocket Connection is
established_, both endpoints MUST use the algorithm described in established_, both endpoints MUST use the algorithm described in
Section 5 to exchange messages, using the payload data transformation Section 5 to exchange messages, using the payload data transformation
procedure of the PMCE returned by the server. (compressing and decompressing) procedure of the PMCE returned by the
server.
4.1. Negotiation Examples 4.1. Negotiation Examples
The followings are example values for the "Sec-WebSocket-Extensions" The followings are example values for the "Sec-WebSocket-Extensions"
header offering PMCEs. permessage-foo and permessage-bar in the header offering PMCEs. permessage-foo and permessage-bar in the
examples are hypothetical extension names of PMCEs for compression examples are hypothetical extension names of PMCEs for compression
algorithm foo and bar. algorithm foo and bar.
o Offer the permessage-foo. o Offer the permessage-foo.
skipping to change at page 8, line 7 skipping to change at page 8, line 7
permessage-foo, permessage-bar permessage-foo, permessage-bar
o Offer the permessage-foo with a parameter use_y which enables a o Offer the permessage-foo with a parameter use_y which enables a
feature y as first choice, and the permessage-foo without the feature y as first choice, and the permessage-foo without the
use_y parameter as a fallback plan. use_y parameter as a fallback plan.
permessage-foo; use_y, permessage-foo permessage-foo; use_y, permessage-foo
5. Framing 5. Framing
PMCEs operate only on non-control messages.
This document allocates the RSV1 bit of the WebSocket header for
PMCEs, and calls the bit the "Per-message Compressed" bit. On a
WebSocket connection where a PMCE is in use, this bit indicates
whether a message is compressed or not.
A message with the "Per-message Compressed" bit set on the first
fragment of the message is called "compressed message". Frames of a
compressed message have compressed data in the payload data portion.
An endpoint received a compressed message decompresses the
concatenation of the compressed data of the frames of the message by
following the decompressing procedure specified by the PMCE in use.
The endpoint uses the bytes corresponding to the application data
portion in this decompressed data for the _A WebSocket Message Has
Been Received_ event instead of the received data as-is.
A message with the "Per-message Compressed" bit unset on the first
fragment of the message is called "uncompressed message". Frames of
an uncompressed message have uncompressed original data as-is in the
payload data portion. An endpoint received an uncompressed message
uses the concatenation of the application data portion of the frames
of the message as-is for the _A WebSocket Message Has Been Received_
event.
5.1. Sending 5.1. Sending
An endpoint uses the following algorithm to compressed a message to To send a message in the form of a compressed message, an endpoint
send. uses the following algorithm.
1. Compress the payload data portion of the message using the 1. Compress the payload data portion of the original message by
compression algorithm. following the compression procedure of the PMCE.
2. Build frame(s) for the message by putting the resulting octets 2. Build frame(s) by putting the compressed data instead of the
instead of the original octets. original data for the payload data portion.
3. Set the "Per-message Compressed" bit of the first fragment to 1. 3. Set the "Per-message Compressed" bit of the first frame.
PMCEs don't change the opcode field. The payload data portion in 4. Send the frame(s).
outgoing frames output by a PMCE is not subject to the constraints
for the original data type. At the receiver, the payload data
portion after decompressing is subject to the constraints for the
original data type again.
To send an uncompressed message, an endpoint sets the "Per-message To send a message in the form of an uncompressed message, an endpoint
Compressed" bit of the first fragment of the message to 0. The uses the following algorithm.
payload data portion of the message is sent as-is without applying
the compression. 1. Build frame(s) by putting the original data for payload data
portion as-is.
2. Unset the "Per-message Compressed" bit of the first frame.
3. Send the frame(s).
An endpoint MUST NOT set the "Per-message Compressed" bit of control
frames and non-first fragments of a data message. An endpoint
received such a frame MUST _Fail the WebSocket Connection_.
PMCEs don't change the opcode field. The opcode of the first frame
of a compress message indicates the opcode of the original message.
The payload data portion in frames generated by a PMCE is not subject
to the constraints for the original data type. For example, the
concatenation of the data corresponding to the application data
portion of frames of a compressed text message may be not valid
UTF-8. At the receiver, the payload data portion after decompression
is subject to the constraints for the original data type again.
5.2. Receiving 5.2. Receiving
To receive a compressed message, an endpoint decompress the payload To receive a message in the form of a compressed message, an endpoint
data portion in the frames of the message. uses the following algorithm.
An endpoint receives an uncompressed message as-is without 1. Concatenate the payload data portion of the received frames of
decompression. the compressed message.
2. Decompress the concatenation by following the decompression
procedure of the PMCE.
To receive a message in the form of an uncompressed message, an
endpoint uses the following algorithm.
1. Concatenate the payload data portion of the received frames of
the uncompressed message.
2. Handle the concatenation as-is.
6. permessage-deflate extension 6. permessage-deflate extension
This section specifies a specific PMCE called "permessage-deflate". This section specifies a specific PMCE called "permessage-deflate".
It compresses the payload data portion of messages using the DEFLATE It compresses the payload data portion of messages using the DEFLATE
[RFC1951] and the byte boundary aligning method introduced in [RFC1951] and the byte boundary aligning method introduced in
[RFC1979]. [RFC1979].
The registered extension name for this extension is The registered extension name for this extension is
"permessage-deflate". "permessage-deflate".
The following 4 extension parameters are defined for this extension. For an offer for this extension, the following 3 extension parameters
are defined.
o "s2c_no_context_takeover"
o "s2c_max_window_bits"
o "c2s_max_window_bits"
For a response for this extension, the following 4 extension
parameters are defined.
o "s2c_no_context_takeover" o "s2c_no_context_takeover"
o "c2s_no_context_takeover" o "c2s_no_context_takeover"
o "s2c_max_window_bits" o "s2c_max_window_bits"
o "c2s_max_window_bits" o "c2s_max_window_bits"
A server MUST decline a "permessage-deflate" offer if any of the A server MUST decline a "permessage-deflate" offer if any of the
following conditions is met: following conditions is met:
o The offer has any extension parameter unknown to the server. o The offer has any extension parameter not defined for use in an
offer.
o The offer has any extension parameter with an invalid value. o The offer has any extension parameter with an invalid value.
o The offer has multiple extension parameters with the same name. o The offer has multiple extension parameters with the same name.
o The server doesn't support the offered configuration. o The server doesn't support the offered configuration.
A client MUST _Fail the WebSocket Connection_ if the server accepted A client MUST _Fail the WebSocket Connection_ if the server accepted
a "permessage-deflate" offer with a response meeting any of the a "permessage-deflate" offer with a response meeting any of the
following condition: following condition:
o The response has any extension parameter unknown to the client. o The response has any extension parameter not defined for use in a
response.
o The response has any extension parameter with an invalid value. o The response has any extension parameter with an invalid value.
o The response has multiple extension parameters with the same name. o The response has multiple extension parameters with the same name.
o The client doesn't support the configuration the response o The client doesn't support the configuration the response
represents. represents.
6.1. Method Parameters 6.1. Method Parameters
 End of changes. 34 change blocks. 
135 lines changed or deleted 200 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/