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

Willy Tarreau <w@1wt.eu> Tue, 06 September 2011 16:21 UTC

Return-Path: <w@1wt.eu>
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 A034B21F8B62; Tue, 6 Sep 2011 09:21:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.07
X-Spam-Level:
X-Spam-Status: No, score=-4.07 tagged_above=-999 required=5 tests=[AWL=-2.027, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 Er00OZ8TtGws; Tue, 6 Sep 2011 09:21:30 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by ietfa.amsl.com (Postfix) with ESMTP id CEFE921F8B5A; Tue, 6 Sep 2011 09:21:29 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p86GMuwt015578; Tue, 6 Sep 2011 18:22:56 +0200
Date: Tue, 06 Sep 2011 18:22:56 +0200
From: Willy Tarreau <w@1wt.eu>
To: "Richard L. Barnes" <rbarnes@bbn.com>
Message-ID: <20110906162256.GA15448@1wt.eu>
References: <942CCA6B-B784-441B-96CA-3506FFC439E1@bbn.com> <CALiegfmyQ5h4S2FgBnrh2VLr8+q-h0sLiGsww7T+1VwYNRo4wQ@mail.gmail.com> <72E40A0F-C923-472F-9534-538B89F7A444@bbn.com> <20110906144744.GA14058@1wt.eu> <DE6E1224-791F-48F3-AF4E-0D07ED2741B7@bbn.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <DE6E1224-791F-48F3-AF4E-0D07ED2741B7@bbn.com>
User-Agent: Mutt/1.4.2.3i
Cc: General Area Review Team <gen-art@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:21:30 -0000

On Tue, Sep 06, 2011 at 10:51:10AM -0400, Richard L. Barnes wrote:
> No, you have to process at most three bytes, four if you include the opcode.  See sample code.
> --Richard 

I think you misunderstood me. When you receive 40kB of UTF-8 text, if
you want to stop on frame boundaries, you have to parse the data anyway.
Even if you just want to focus on the last bytes, you have to prevent
yourself from blindly forwarding the whole frame in order to check the
last bytes that you probably don't have yet, which significantly reduces
the benefits of splicing and makes the processing quite more complex.

Really, as it was stated many times, a recipient should not consider a
single frame as containing valid contents, just like data can be split
across multiple TCP packets without affecting their meaning.

I think the point you raised in fact is that having an encoding type
on a frame does not make much sense and it only makes sense on a whole
message.

Regards,
Willy