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

Mykyta Yevstifeyev <evnikita2@gmail.com> Wed, 13 July 2011 17:08 UTC

Return-Path: <evnikita2@gmail.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 CC7E421F8760 for <hybi@ietfa.amsl.com>; Wed, 13 Jul 2011 10:08:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.508
X-Spam-Level:
X-Spam-Status: No, score=-4.508 tagged_above=-999 required=5 tests=[AWL=1.091, BAYES_00=-2.599, GB_I_LETTER=-2, RCVD_IN_DNSWL_LOW=-1]
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 gS-yP60RBPVd for <hybi@ietfa.amsl.com>; Wed, 13 Jul 2011 10:08:47 -0700 (PDT)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by ietfa.amsl.com (Postfix) with ESMTP id 1792521F86EA for <hybi@ietf.org>; Wed, 13 Jul 2011 10:08:46 -0700 (PDT)
Received: by eye13 with SMTP id 13so2539935eye.31 for <hybi@ietf.org>; Wed, 13 Jul 2011 10:08:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=764Q4JNjslh0tG2dsMj+UZxMnAFuBcWWbCQF/3lG8n8=; b=M5WIXsPhmMBHYEQ1FWkVZS9ZsDm2Kcb9mxYVhVqGLJOOlFrMWmqyyR6DgkeGv4Aw2a zmkOoaUMeGtUnSgJuqgIgDCL0vCu6tqtvkp3+VfqqVSpNArsdnlOjpo2EGTS88UtbnL+ wA9R7vAoDpnNPMHFxb5UJIeA8F7N0D4SpTyIM=
Received: by 10.213.33.81 with SMTP id g17mr147380ebd.87.1310576926155; Wed, 13 Jul 2011 10:08:46 -0700 (PDT)
Received: from [127.0.0.1] ([195.191.104.224]) by mx.google.com with ESMTPS id s76sm2022200eea.38.2011.07.13.10.08.44 (version=SSLv3 cipher=OTHER); Wed, 13 Jul 2011 10:08:45 -0700 (PDT)
Message-ID: <4E1DD14A.80402@gmail.com>
Date: Wed, 13 Jul 2011 20:09:30 +0300
From: Mykyta Yevstifeyev <evnikita2@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
To: Barry Leiba <barryleiba@computer.org>
References: <20110711140229.17432.23519.idtracker@ietfa.amsl.com> <4E1BD054.7010103@gmail.com> <8B0A9FCBB9832F43971E38010638454F040B419E9E@SISPE7MB1.commscope.com> <4E1C0CE9.10009@gmail.com> <CALiegf=22nxQTZKBTrJnjt+u_OYQX-hknzqQOE4v0GeUKJuDUw@mail.gmail.com> <4E1C12DE.9060703@gmail.com> <CAC4RtVAPBjG=KHE1iuDsTjwd5xgvmuD1XiL26Fv=r6qR-1T=JQ@mail.gmail.com>
In-Reply-To: <CAC4RtVAPBjG=KHE1iuDsTjwd5xgvmuD1XiL26Fv=r6qR-1T=JQ@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Wed, 13 Jul 2011 10:13:11 -0700
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: Wed, 13 Jul 2011 17:08:47 -0000

13.07.2011 17:41, Barry Leiba wrote:
>>>>> BIT            =  "0" / "1"
>>>> implies that<BIT>    may be either ASCII 0x31 - "1" - or ASCII 0x30 - "0".
>>>>   Once more, ABNF is for chars/octets, not bits.
> Mykyta, be careful not to confuse the code for generating ABNF (for
> which what you say above is correct) with the *use* of ABNF in
> protocol specifications (for which you're wrong).
>
> The construct above,<<  BIT = "0" / "1">>, says that when you're
> writing ABNF, you use the characters "0" and "1" (codes 30 and 31) to
> represent the bit values.  But when we apply that ABNF in a protocol,
> we can get any of these:
>
> the-letter-c = %b01100011  ; also %x63
>
> halfbyte-value-3 = %b0011  ; also %x3
>
> two-bits-both-set = %b11
>
> a-single-one-bit-by-itself = %b1
>
> -----
> %x3 and %x03 are not the same thing, and %b00000011, %b0011, and %b11
> are not the same things.

I can't agree with you here.  ABNF treats anything after %<letter> as 
integer, which is stated in Section 2.3 of RFC 5234:

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

so leading zeros are ignored, as the have no meaning in integers.  
Moreover, and I'll repeat this for the nth time, ABNF deals with 
characters.  So both %b0011 and %b11, and %b00000011 mean the terminal 
value denoting the character under binary code 11 (octet 00000011b) in 
ASCII, BEL char, as far as I see.  RFC 5234 doesn't imply that ABNF may 
be employed to denote bits, half- or parts of bytes, etc.

Mykyta
>
> Barry
>