Subject: [hybi] Extension data and -07

From: Ian Fette (イアンフェッティ) <[email-masked]>
Date: Wed, 27 Apr 2011 20:08:05 -0700

There seems to be some confusion on this issue in various threads, so I'd
like to make my intent clear -

I did not remove extension data from the framing, nor did I remove its
definition. I simply changed the diagrammatic representation of a frame to
reference "payload data" instead of "application data" and "extension data"
separately, as visually it looked as if it implied something about the
relative size of each, or that one would always be present, which is not the
case. (One could imagine a frame with only extension data or only payload
data). We also have text that discusses payload data, namely the masking
text, so this needed to be more clearly defined.

If you look at the ABNF, you will see

frame-payload-data      = (frame-masked-extension-data
                              frame-masked-application-data)   ;
frame-masked 1
                           / (frame-unmasked-extension-data
                              frame-unmasked-application-data) ;
frame-masked 0

   frame-masked-extension-data     = *( %x00-FF ) ; to be defined later

   frame-masked-application-data   = *( %x00-FF )

   frame-unmasked-extension-data   = *( %x00-FF ) ; to be defined later

   frame-unmasked-application-data = *( %x00-FF )

I.e. extension data is still defined. Ditto in 4.2 describing the fields of
the graphical representation:

   Payload data:  n bytes

      The payload data is defined as Extension Data concatenated with
      Application Data.

   Extension data:  n bytes

      The extension data is 0 bytes unless an extension has been
      negotiated.  Any extension MUST specify the length of the
      extension data, or how that length may be calculated, and how the
      extension use MUST be negotiated during the handshake.  If
      present, the extension data is included in the total payload
      length.

   Application data:  n bytes

      Arbitrary application data, taking up the remainder of the frame
      after any extension data.  The length of the Application data is
      equal to the payload length minus the length of the Extension

Thus, I am a bit confused by people saying things like "the removal of
extension data is incomplete". It is not intended as a removal.

---

From: Greg Wilkins <[email-masked]>
Date: Thu, 28 Apr 2011 13:18:49 +1000

> extension data is incomplete". It is not intended as a removal.

Sorry - my bad.    I read too much into your change of phrasing, as
there had previously been discussions as to how extension data is not
really applicable.

We now have 3 examples of extensions and none of them use extension
data as it is formulated:

 deflate-stream - mutates the entire stream including framing
 deflate-frame  - mutates the entire application data
 x-google-mux - mixes in extension data as mux blocks, of which there
can me many per frame, so the data is not prepended.

Thus I think that we should generalise it and simply say that
extensions may mutate payload data including changing the size of the
payload.

regards