Subject: [hybi] I-D Action: draft-ietf-hybi-thewebsocketprotocol-17.txt

From: [email-masked]
Date: Fri, 30 Sep 2011 02:21:34 -0700

A New Internet-Draft is available from the on-line Internet-Drafts directories. This draft is a work item of the BiDirectional or Server-Initiated HTTP Working Group of the IETF.

	Title           : The WebSocket protocol
	Author(s)       : Ian Fette
                          Alexey Melnikov
	Filename        : draft-ietf-hybi-thewebsocketprotocol-17.txt
	Pages           : 77
	Date            : 2011-09-30

   The WebSocket protocol enables two-way communication between a client
   running untrusted code running in a controlled environment to a
   remote host that has opted-in to communications from that code.  The
   security model used for this is the Origin-based security model
   commonly used by Web browsers.  The protocol consists of an opening
   handshake followed by basic message framing, layered over TCP.  The
   goal of this technology is to provide a mechanism for browser-based
   applications that need two-way communication with servers that does
   not rely on opening multiple HTTP connections (e.g. using
   XMLHttpRequest or &lt;iframe&gt;s and long polling).

   Please send feedback to the [email-masked] mailing list.

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-hybi-thewebsocketprotocol-17.txt

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

This Internet-Draft can be retrieved at:
ftp://ftp.ietf.org/internet-drafts/draft-ietf-hybi-thewebsocketprotocol-17.txt

---

From: Peter Saint-Andre <[email-masked]>
Date: Fri, 30 Sep 2011 06:08:06 -0600

On 9/30/11 3:21 AM, [email-masked] wrote:
> A New Internet-Draft is available from the on-line Internet-Drafts
> directories. This draft is a work item of the BiDirectional or
> Server-Initiated HTTP Working Group of the IETF.

I have informed the IESG Secretary that this document is now approved.

Many thanks to the editors and the working group for their patience and
persistence throughout this process.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Fri, 30 Sep 2011 14:13:51 +0200

> persistence throughout this process.

Will the definitived Sec-WebSocket-Version value be 13 (the unlucky number)? :)

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Joe Mason <[email-masked]>
Date: Fri, 30 Sep 2011 10:38:11 -0400

Woops!  That's not right...

   ws-frame                = frame-fin           ; 1 bit in length
                             frame-rsv1          ; 1 bit in length
                             frame-rsv2          ; 1 bit in length
                             frame-rsv3          ; 1 bit in length
                             frame-opcode        ; 4 bits in length
                             frame-masked        ; 1 bit in length
                             frame-payload-length   ;  7 bits in length
                             [ frame-masking-key ]  ; 16 or 64 bits in length
                             frame-payload-data     ; n * 8 bits in length,
                                                    ; where n >= 0

frame-payload-length is 7, 16 or 64 bits in length.
frame-masking-key is 32 bits in length

The comments next to the actual productions are correct.  Except that frame-opcode-non-control is missing the length comment (4 bits).

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> [email-masked]
> Sent: Friday, September 30, 2011 5:22 AM
> To: [email-masked]
> Cc: [email-masked]
> Subject: [hybi] I-D Action: draft-ietf-hybi-thewebsocketprotocol-17.txt
> 
> directories. This draft is a work item of the BiDirectional or Server-
> Initiated HTTP Working Group of the IETF.
> 
> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

---

From: Joe Mason <[email-masked]>
Date: Fri, 30 Sep 2011 10:39:26 -0400

Actually that's not true either - frame-payload-length is 7, 7+16 or 7+64 bits in length.

> Joe Mason
> Sent: Friday, September 30, 2011 10:38 AM
> To: [email-masked]; [email-masked]
> Cc: [email-masked]
> Subject: Re: [hybi] I-D Action: draft-ietf-hybi-thewebsocketprotocol-
> 17.txt
> 
> The comments next to the actual productions are correct.  Except that
> frame-opcode-non-control is missing the length comment (4 bits).
> 
> Server-
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute non-
> public information. Any use of this information by anyone other than
> the intended recipient is prohibited. If you have received this
> transmission in error, please immediately reply to the sender and
> delete this information from your system. Use, dissemination,
> distribution, or reproduction of this transmission by unintended
> recipients is not authorized and may be unlawful.

---

From: Peter Saint-Andre <[email-masked]>
Date: Fri, 30 Sep 2011 09:14:50 -0600

Thanks, Joe. If you or others find small errors like this, feel free to
post them on the list or inform the editors directly, so that they can
be fixed during the publication phase known as Authors' Final Review or
"AUTH48":

http://www.rfc-editor.org/pubprocess.html#auth48

Thanks!

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

---

From: Ian Fette (イアンフェッティ) <[email-masked]>
Date: Fri, 30 Sep 2011 08:31:28 -0700

Fixed in SVN:

 ws-frame                = frame-fin           ; 1 bit in length
                             frame-rsv1          ; 1 bit in length
                             frame-rsv2          ; 1 bit in length
                             frame-rsv3          ; 1 bit in length
                             frame-opcode        ; 4 bits in length
                             frame-masked        ; 1 bit in length
                             frame-payload-length   ; either 7, 7+16, or
                                                    ; 7 + 64 bits in length
                             [ frame-masking-key ]  ; 32 bits in length
                             frame-payload-data     ; n * 8 bits in length,
                                                    ; where n >= 0

...

   frame-opcode-non-control= %x1 ; text frame
                           / %x2 ; binary frame
                           / %x3-7
                           ; 4 bits in length,
                           ; reserved for further non-control frames

   frame-opcode-control    = %x8 ; connection close
                           / %x9 ; ping
                           / %xA ; pong
                           / %xB-F ; reserved for further control frames
                                 ; 4 bits in length

   frame-masked            = %x0
                          ; frame is not masked, no frame-masking-key
                           / %x1
                          ; frame is masked, frame-masking-key present
                          ; 1 bit in length

   frame-payload-length    = %x00-7D
                           / %x7E frame-payload-length-16
                           / %x7F frame-payload-length-63
                           ; 7, 7+16, or 7+64 bits in length

   frame-payload-length-16 = %x0000-FFFF ; 16 bits in length

   frame-payload-length-63 = %x0000000000000000-7FFFFFFFFFFFFFFF
                           ; 64 bits in length

On Fri, Sep 30, 2011 at 8:14 AM, Peter Saint-Andre <[email-masked]>wrote:

> solicitor-client or other applicable privileges), or constitute non-public
> information. Any use of this information by anyone other than the intended
> recipient is prohibited. If you have received this transmission in error,
> please immediately reply to the sender and delete this information from your
> system. Use, dissemination, distribution, or reproduction of this
> transmission by unintended recipients is not authorized and may be unlawful.

---

From: Peter Saint-Andre <[email-masked]>
Date: Fri, 30 Sep 2011 09:33:05 -0600

Super. The RFC Editor team will ask you to provide XML source, so you
can proactively fix such nits before you send them the XML. :)

On 9/30/11 9:31 AM, Ian Fette (イアンフェッティ) wrote:
> On Fri, Sep 30, 2011 at 8:14 AM, Peter Saint-Andre <[email-masked]
> <mailto:[email-masked]>> wrote:
> 
>     >> From: [email-masked] <mailto:[email-masked]>
>     [mailto:[email-masked] <mailto:[email-masked]>] On
>     Behalf Of
>     >> Joe Mason
>     >> To: [email-masked] <mailto:[email-masked]>;
>     [email-masked] <mailto:[email-masked]>
>     >> Cc: [email-masked] <mailto:[email-masked]>
>     >>                              [ frame-masking-key ]  ; 16 or 64
>     bits in
>     >> length
>     >>> From: [email-masked] <mailto:[email-masked]>
>     [mailto:[email-masked] <mailto:[email-masked]>] On Behalf
>     >> Of
>     >>> [email-masked] <mailto:[email-masked]>
>     >>> To: [email-masked] <mailto:[email-masked]>
>     >>> Cc: [email-masked] <mailto:[email-masked]>
>     >>>    Please send feedback to the [email-masked]
>     <mailto:[email-masked]> mailing list.
>     >>>
>     >>>
>     >>> [email-masked] <mailto:[email-masked]>
>     >> [email-masked] <mailto:[email-masked]>
>     > This transmission (including any attachments) may contain
>     confidential information, privileged material (including material
>     protected by the solicitor-client or other applicable privileges),
>     or constitute non-public information. Any use of this information by
>     anyone other than the intended recipient is prohibited. If you have
>     received this transmission in error, please immediately reply to the
>     sender and delete this information from your system. Use,
>     dissemination, distribution, or reproduction of this transmission by
>     unintended recipients is not authorized and may be unlawful.
>     > [email-masked] <mailto:[email-masked]>

---

From: Joe Mason <[email-masked]>
Date: Fri, 30 Sep 2011 11:35:16 -0400

I would probably word frame-payload-length as “7 bits in length, plus the length of frame-payload-length16 or frame-payload-length63 if present”.

Or split the comment into 3:

frame-payload-length    = %x00-7D    ; 7 bits in length
                           / %x7E frame-payload-length-16    ; 7 bits in length, plus the length of frame-payload-length-16
                           / %x7F frame-payload-length-63   ; 7 bits in length, plus the length of frame-payload-length-63

From: Ian Fette (イアンフェッティ) [mailto:[email-masked]]
Sent: Friday, September 30, 2011 11:31 AM
To: Peter Saint-Andre
Cc: Joe Mason; [email-masked]
Subject: Re: [hybi] I-D Action: draft-ietf-hybi-thewebsocketprotocol-17.txt

Fixed in SVN:

...

   frame-masked            = %x0

On Fri, Sep 30, 2011 at 8:14 AM, Peter Saint-Andre <[email-masked]<mailto:[email-masked]>> wrote:
Thanks, Joe. If you or others find small errors like this, feel free to
post them on the list or inform the editors directly, so that they can
be fixed during the publication phase known as Authors' Final Review or
"AUTH48":

Thanks!

Peter

On 9/30/11 8:39 AM, Joe Mason wrote:
>> From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]<mailto:[email-masked]>] On Behalf Of
>> Joe Mason
>> To: [email-masked]<mailto:[email-masked]>; [email-masked]<mailto:[email-masked]>
>> Cc: [email-masked]<mailto:[email-masked]>
>>> From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]<mailto:[email-masked]>] On Behalf
>> Of
>>> [email-masked]<mailto:[email-masked]>
>>> To: [email-masked]<mailto:[email-masked]>
>>> Cc: [email-masked]<mailto:[email-masked]>
>>>    Please send feedback to the [email-masked]<mailto:[email-masked]> mailing list.
>>>
>>>
>>> [email-masked]<mailto:[email-masked]>
>> [email-masked]<mailto:[email-masked]>
> [email-masked]<mailto:[email-masked]>

--
Peter Saint-Andre
https://stpeter.im/

_______________________________________________
hybi mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/hybi

---

From: Ian Fette (イアンフェッティ) <[email-masked]>
Date: Fri, 30 Sep 2011 08:46:11 -0700

Splitting it in three worries me as I think it's too easy to just see the 7
bits in length in the first line.

How about

   frame-payload-length    = %x00-7D
                           / %x7E frame-payload-length-16
                           / %x7F frame-payload-length-63
                           ; 7, 7+16, or 7+64 bits in length, respectively

(e.g. add "respectively" so it's clear that the lengths line up with these
three options)?

-Ian

On Fri, Sep 30, 2011 at 8:35 AM, Joe Mason <[email-masked]> wrote:

> I would probably word frame-payload-length as “7 bits in length, plus the
> length of frame-payload-length16 or frame-payload-length63 if present”.***
> *
>
> ** **
>
> Or split the comment into 3:****
>
> ** **
>
> frame-payload-length    = %x00-7D    ; 7 bits in length****
>
>                            / %x7E frame-payload-length-16    ; 7 bits in
> length, plus the length of frame-payload-length-16****
>
>                            / %x7F frame-payload-length-63   ; 7 bits in
> length, plus the length of frame-payload-length-63****
>
> ** **
>
> *From:* Ian Fette (イアンフェッティ) [mailto:[email-masked]]
> *Sent:* Friday, September 30, 2011 11:31 AM
> *To:* Peter Saint-Andre
> *Cc:* Joe Mason; [email-masked]
>
> *Subject:* Re: [hybi] I-D Action:
> draft-ietf-hybi-thewebsocketprotocol-17.txt****
>
> ** **
>
> Fixed in SVN:****
>
> ** **
>
>  ws-frame                = frame-fin           ; 1 bit in length****
>
>                              frame-rsv1          ; 1 bit in length****
>
>                              frame-rsv2          ; 1 bit in length****
>
>                              frame-rsv3          ; 1 bit in length****
>
>                              frame-opcode        ; 4 bits in length****
>
>                              frame-masked        ; 1 bit in length****
>
>                              frame-payload-length   ; either 7, 7+16, or**
> **
>
>                                                     ; 7 + 64 bits in length
> ****
>
>                              [ frame-masking-key ]  ; 32 bits in length***
> *
>
> ****
>                                                     ; where n >= 0****
> ** **
> ...****
> ** **
>    frame-opcode-non-control= %x1 ; text frame****
>
>                            / %x2 ; binary frame****
>
>                            / %x3-7****
>
>                            ; 4 bits in length,****
>
>                            ; reserved for further non-control frames****
>
> ** **
>
>    frame-opcode-control    = %x8 ; connection close****
>
>                            / %x9 ; ping****
>
>                            / %xA ; pong****
>
>                            / %xB-F ; reserved for further control frames**
> **
>
>                                  ; 4 bits in length****
>
> ** **
>
>    frame-masked            = %x0****
>
>                           ; frame is not masked, no frame-masking-key****
>
>                            / %x1****
>
>                           ; frame is masked, frame-masking-key present****
>
>                           ; 1 bit in length****
>
> ** **
>
>    frame-payload-length    = %x00-7D****
>
>                            / %x7E frame-payload-length-16****
>
>                            / %x7F frame-payload-length-63****
>
>                            ; 7, 7+16, or 7+64 bits in length****
>
> ** **
>
>    frame-payload-length-16 = %x0000-FFFF ; 16 bits in length****
>
> ** **
>
>    frame-payload-length-63 = %x0000000000000000-7FFFFFFFFFFFFFFF****
>
>                            ; 64 bits in length****
>
> ** **
>
> ** **
>
> ** **
>
> On Fri, Sep 30, 2011 at 8:14 AM, Peter Saint-Andre <[email-masked]>
> wrote:****
>
> Peter****
> ****
> ****
> https://www.ietf.org/mailman/listinfo/hybi****
>
> ** **

---

From: Joe Mason <[email-masked]>
Date: Fri, 30 Sep 2011 13:21:54 -0400

Works for me.

From: Ian Fette (イアンフェッティ) [mailto:[email-masked]]
Sent: Friday, September 30, 2011 11:46 AM
To: Joe Mason
Cc: Peter Saint-Andre; [email-masked]
Subject: Re: [hybi] I-D Action: draft-ietf-hybi-thewebsocketprotocol-17.txt

Splitting it in three worries me as I think it's too easy to just see the 7 bits in length in the first line.

How about

(e.g. add "respectively" so it's clear that the lengths line up with these three options)?

-Ian

On Fri, Sep 30, 2011 at 8:35 AM, Joe Mason <[email-masked]<mailto:[email-masked]>> wrote:
I would probably word frame-payload-length as “7 bits in length, plus the length of frame-payload-length16 or frame-payload-length63 if present”.

From: Ian Fette (イアンフェッティ) [mailto:[email-masked]<mailto:[email-masked]>]
Sent: Friday, September 30, 2011 11:31 AM
To: Peter Saint-Andre
Cc: Joe Mason; [email-masked]<mailto:[email-masked]>

Fixed in SVN:

...

   frame-masked            = %x0

Thanks!

Peter

---

From: "Martin J. Dürst" <[email-masked]>
Date: Sat, 01 Oct 2011 12:53:40 +0900

I'm okay with what Ian proposed, but there are other ways to do this 
that may be more explicit.

How about something like:

                                           ; 7+16 bits in length
                                           ; 7+64 bits in length

Another alternative is:

      frame-payload-length    = short-frame-payload-length
                              / middle-frame-payload-length
                              / long-frame-payload-length

and then:

      short-frame-payload-length  = %x00-7D ; 7 bits in length

      middle-frame-payload-length = %x7E frame-payload-length-16
                                    ; 7+16 bits in length

      long-frame-payload-length   = %x7F frame-payload-length-63
                                    ; 7+64 bits in length

Regards,   Martin.

On 2011/10/01 0:46, Ian Fette (イアンフェッティ) wrote:
> On Fri, Sep 30, 2011 at 8:35 AM, Joe Mason<[email-masked]>  wrote:
>
>>                                                      ; where n>= 0****
>> On Fri, Sep 30, 2011 at 8:14 AM, Peter Saint-Andre<[email-masked]>
>> wrote:****
>>
>>>>                                                      ; where n>= 0
>>>>>     XMLHttpRequest or&lt;iframe&gt;s and long polling).
>>>>>