Re: [hybi] Framing take IV [why fragment]

Patrick McManus <mcmanus@ducksong.com> Wed, 04 August 2010 18:49 UTC

Return-Path: <mcmanus@ducksong.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 69F993A67D4 for <hybi@core3.amsl.com>; Wed, 4 Aug 2010 11:49:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.464
X-Spam-Level:
X-Spam-Status: No, score=-2.464 tagged_above=-999 required=5 tests=[AWL=0.135, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XsNHZKTHzhcm for <hybi@core3.amsl.com>; Wed, 4 Aug 2010 11:48:59 -0700 (PDT)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 56B863A657C for <hybi@ietf.org>; Wed, 4 Aug 2010 11:48:59 -0700 (PDT)
Received: by linode.ducksong.com (Postfix, from userid 1000) id C82DF102A5; Wed, 4 Aug 2010 14:49:28 -0400 (EDT)
Received: from [192.168.16.214] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 076BD1014F; Wed, 4 Aug 2010 14:49:26 -0400 (EDT)
From: Patrick McManus <mcmanus@ducksong.com>
To: Ian Hickson <ian@hixie.ch>
In-Reply-To: <Pine.LNX.4.64.1008041754000.5947@ps20323.dreamhostps.com>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com> <Pine.LNX.4.64.1008040050040.5947@ps20323.dreamhostps.com> <AANLkTi=3CJDKu37LV+6CG=d7VP5fOe-JNV9Cd=99BjjA@mail.gmail.com> <2AD09E86-CFFE-4378-A437-7EAE2E3026FD@apple.com> <1280937841.7561.292.camel@tng> <Pine.LNX.4.64.1008041754000.5947@ps20323.dreamhostps.com>
Content-Type: text/plain; charset="UTF-8"
Date: Wed, 04 Aug 2010 14:51:01 -0400
Message-ID: <1280947861.7561.388.camel@tng>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing take IV [why fragment]
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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, 04 Aug 2010 18:49:00 -0000

On Wed, 2010-08-04 at 17:55 +0000, Ian Hickson wrote:
> On Wed, 4 Aug 2010, Patrick McManus wrote:
> > 
> > But I also believe fragments with fixed lengths are simpler than a BER 
> > because properly aligned lengths are always correct data - there are no 
> > error cases as all the bits are defined to be some quantity regardless 
> > of their arrangement. BER has error cases and determining the expressed 
> > quantity requires multiple indirections and a significant algorithm to 
> > use it.
> 


> As far as I can tell there are no error cases as defined in WebSockets.
> 

I believe the specific ber length suggestion was:

 - a BER-encoded packed integer, most-significant-digits first, high bit
used to indicate a continuation byte, giving the payload length.

In that case, as I understand it, it would be an error if the ber type
encoding byte didn't specify a universal primitive type of 2. (or maybe
I'm wrong and it needs to be some other identifier - but that doesn't
really matter).

it is not a big deal, but it is an error case.