Re: [hybi] Review of draft-ietf-hybi-thewebsocketprotocol-13

Bjoern Hoehrmann <derhoermi@gmx.net> Tue, 06 September 2011 16:36 UTC

Return-Path: <derhoermi@gmx.net>
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 6C42621F8B61 for <hybi@ietfa.amsl.com>; Tue, 6 Sep 2011 09:36:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.228
X-Spam-Level:
X-Spam-Status: No, score=-4.228 tagged_above=-999 required=5 tests=[AWL=-1.629, BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rMQ0edyKtlmt for <hybi@ietfa.amsl.com>; Tue, 6 Sep 2011 09:36:09 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 1CE7721F8B54 for <hybi@ietf.org>; Tue, 6 Sep 2011 09:36:08 -0700 (PDT)
Received: (qmail invoked by alias); 06 Sep 2011 16:37:54 -0000
Received: from dslb-094-222-137-018.pools.arcor-ip.net (EHLO HIVE) [94.222.137.18] by mail.gmx.net (mp021) with SMTP; 06 Sep 2011 18:37:54 +0200
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX19KIQ8qKSFKgQkIMH6Oy0hzv4rPLOK6G8T2D2U3mQ z3HsVQn3wCU7h8
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: "Richard L. Barnes" <rbarnes@bbn.com>
Date: Tue, 06 Sep 2011 18:38:01 +0200
Message-ID: <c8ic67por9b7638k4cuoqr4blvneo2hlh3@hive.bjoern.hoehrmann.de>
References: <942CCA6B-B784-441B-96CA-3506FFC439E1@bbn.com> <CALiegfmyQ5h4S2FgBnrh2VLr8+q-h0sLiGsww7T+1VwYNRo4wQ@mail.gmail.com> <72E40A0F-C923-472F-9534-538B89F7A444@bbn.com> <634914A010D0B943A035D226786325D422C0EB8D18@EXVMBX020-12.exch020.serverdata.net> <365A444D-CF7D-41A0-A446-7306DE4CDBBC@bbn.com>
In-Reply-To: <365A444D-CF7D-41A0-A446-7306DE4CDBBC@bbn.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: General Area Review Team <gen-art@ietf.org>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Review of draft-ietf-hybi-thewebsocketprotocol-13
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, 06 Sep 2011 16:36:10 -0000

* Richard L. Barnes wrote:
>If frames are valid utf-8, then you don't need to keep any state (on
>either end of the connection).

That's somewhat misleading. If you accept for instance both binary and
text frames, you have to maintain the type of the first frame so you can
reject continuation frames of the wrong type. You may also have to main-
tain state coming from extension data or your protocol may require other
state to be maintained. A minimal byte-oriented UTF-8 validator has nine
states http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ and that seems less
onerous to maintain than having fragmenting senders and forwarders to
find where character and byte boundaries coincide (you need to have the
encoded text available and re-sychronize to character boundaries, or
have the character stream available with analyze the encoded widths, or
you have to include padding within the text, to start sending).
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/