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 23: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 17FDF11E8085 for <hybi@ietfa.amsl.com>; Tue, 12 Jul 2011 16:38:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.549
X-Spam-Level:
X-Spam-Status: No, score=-2.549 tagged_above=-999 required=5 tests=[AWL=0.050, 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 uuzqK44LVXWH for <hybi@ietfa.amsl.com>; Tue, 12 Jul 2011 16:38:25 -0700 (PDT)
Received: from cdcsmgw02.commscope.com (fw.commscope.com [198.135.207.129]) by ietfa.amsl.com (Postfix) with ESMTP id 794B211E8073 for <hybi@ietf.org>; Tue, 12 Jul 2011 16:38:25 -0700 (PDT)
X-AuditID: 0a0404e9-b7b96ae0000033d5-63-4e1cdaf9fe07
Received: from ACDCE7HC2.commscope.com ( [10.86.20.103]) by cdcsmgw02.commscope.com (Symantec Brightmail Gateway) with SMTP id 2E.E4.13269.9FADC1E4; Tue, 12 Jul 2011 18:38:34 -0500 (CDT)
Received: from SISPE7HC1.commscope.com (10.97.4.12) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.159.2; Tue, 12 Jul 2011 18:39:30 -0500
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC1.commscope.com ([fe80::8a9:4724:f6bb:3cdf%10]) with mapi; Wed, 13 Jul 2011 07:39:24 +0800
From: "Thomson, Martin" <Martin.Thomson@commscope.com>
To: Mykyta Yevstifeyev <evnikita2@gmail.com>
Date: Wed, 13 Jul 2011 07:39:22 +0800
Thread-Topic: Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard
Thread-Index: AcxAcizxdZoLyVXtRnmvI4sRkxLVdwAdy9Gg
Message-ID: <8B0A9FCBB9832F43971E38010638454F040B419F6D@SISPE7MB1.commscope.com>
References: <20110711140229.17432.23519.idtracker@ietfa.amsl.com> <4E1BD054.7010103@gmail.com> <8B0A9FCBB9832F43971E38010638454F040B419E9E@SISPE7MB1.commscope.com> <4E1C0CE9.10009@gmail.com>
In-Reply-To: <4E1C0CE9.10009@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 23:38:26 -0000

On 2011-07-12 at 18:59:21, Mykyta Yevstifeyev wrote:
> ABNF is designed to deal with characters represented in octets.  

Not true again.  ABNF has terminal values that are both characters and numeric.  A character mapping (e.g. ASCII, Unicode) can be used to map one to the other.

   Rules resolve into a string of terminal values, sometimes called
   characters.  In ABNF, a character is merely a non-negative integer.

i.e.,
%xHH is a number 
"a" is a character that is mapped to a number using the selected character mapping (Unicode, ASCII)

The number or non-negative integer is the terminal value.  That number might then be encoded using the encoding (UTF-8, ASCII), but that's not interesting to ABNF.

If you want, you can define the terminal value to be a number of 1-bit size.  The string literal can either have no meaning at all, since the strings are ASCII [1].  Then you end up with a 1-bit terminal value which is trivially encoded.

--Martin

[1] Alternatively, a string literal could be redefined to map "0" to 0 and "1" to 1 with all other values invalid - ABNF isn't a law or anything.