Re: [hybi] Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard

"Thomson, Martin" <Martin.Thomson@commscope.com> Tue, 12 July 2011 05:38 UTC

Return-Path: <Martin.Thomson@commscope.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9AB7121F90C5 for <hybi@ietfa.amsl.com>; Mon, 11 Jul 2011 22:38:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.546
X-Spam-Level:
X-Spam-Status: No, score=-2.546 tagged_above=-999 required=5 tests=[AWL=0.053, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Wh-HxkwpAni for <hybi@ietfa.amsl.com>; Mon, 11 Jul 2011 22:38:15 -0700 (PDT)
Received: from cdcsmgw02.commscope.com (fw.commscope.com [198.135.207.129]) by ietfa.amsl.com (Postfix) with ESMTP id 1481E21F90C3 for <hybi@ietf.org>; Mon, 11 Jul 2011 22:38:15 -0700 (PDT)
X-AuditID: 0a0404e9-b7b96ae0000033d5-64-4e1bddcef022
Received: from ACDCE7HC2.commscope.com ( [10.86.20.103]) by cdcsmgw02.commscope.com (Symantec Brightmail Gateway) with SMTP id 7B.23.13269.ECDDB1E4; Tue, 12 Jul 2011 00:38:22 -0500 (CDT)
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.159.2; Tue, 12 Jul 2011 00:39:13 -0500
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Tue, 12 Jul 2011 13:39:10 +0800
From: "Thomson, Martin" <Martin.Thomson@commscope.com>
To: Mykyta Yevstifeyev <evnikita2@gmail.com>
Date: Tue, 12 Jul 2011 13:39:08 +0800
Thread-Topic: Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard
Thread-Index: AcxATxHRghQTU5i7S2WozTwjB/BRSAABBnLA
Message-ID: <8B0A9FCBB9832F43971E38010638454F040B419E9E@SISPE7MB1.commscope.com>
References: <20110711140229.17432.23519.idtracker@ietfa.amsl.com> <4E1BD054.7010103@gmail.com>
In-Reply-To: <4E1BD054.7010103@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>, "draft-ietf-hybi-thewebsocketprotocol@tools.ietf.org" <draft-ietf-hybi-thewebsocketprotocol@tools.ietf.org>
Subject: Re: [hybi] Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jul 2011 05:38:15 -0000

On 2011-07-12 at 14:40:52, Mykyta Yevstifeyev wrote:
> Section 4.2.  I have a concern with usage of ABNF here.  Let's see:
> 
> >     frame-fin               = %x0 ; more frames of this message
> follow
> >                             / %x1 ; final frame of this message
> 
> Which means that ABNF represents characters only; no bits may be 
> represented by it.  

That's not true.  RFC 5234 merely uses ASCII in its example.  The terminal values for this particular application of ABNF could be a single bit in place of a character.  5234 doesn't prohibit this, though it would make most of the default rules meaningless and it would require a little bit of care.

B0 = %x0
B1 = %x1
BIT = B0 / B1
frame = fin reserved opcode (unmasked-payload / masked-payload) ; ...
fin = BIT
reserved = 3BIT
opcode = 4BIT ; or continuation (4B0) / text (3B0 B1) / ...
unmasked-payload = B0 payload-length payload
masked-payload = B1 payload-length 32BIT payload
payload-length = (B0 6BIT) / (6B1 ( B0 16BIT / B1 B0 63BIT ))
payload = 8<payload-length in bytes>

Other sections can use a character as a terminal value, since that's easier; ASCII, ISO-8859-1 or UTF-8, it matters not.


I notice that the picture in 4.2 says only 63 bits if the first length is 127, which is an error, sort of.

--Martin