Re: [hybi] Questions and comments on draft-hybi-thewebsocketprotocol-10

Iñaki Baz Castillo <ibc@aliax.net> Mon, 18 July 2011 08:54 UTC

Return-Path: <ibc@aliax.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 75C3E21F8B64 for <hybi@ietfa.amsl.com>; Mon, 18 Jul 2011 01:54:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.665
X-Spam-Level:
X-Spam-Status: No, score=-2.665 tagged_above=-999 required=5 tests=[AWL=0.012, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, 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 08iyJJxvMrou for <hybi@ietfa.amsl.com>; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by ietfa.amsl.com (Postfix) with ESMTP id B418B21F8ACE for <hybi@ietf.org>; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
Received: by qwc23 with SMTP id 23so2392416qwc.31 for <hybi@ietf.org>; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.44.36 with SMTP id y36mr4574253qce.227.1310979249056; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
Received: by 10.229.185.195 with HTTP; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
In-Reply-To: <4C26A6A5-DA13-45A3-9DBA-D2515DF923CD@mnot.net>
References: <4C26A6A5-DA13-45A3-9DBA-D2515DF923CD@mnot.net>
Date: Mon, 18 Jul 2011 10:54:09 +0200
Message-ID: <CALiegfmYNQkUgFj1c0GJc_B_z6Gx1zBzN8qQGe2ozB-GnGCOeQ@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Mark Nottingham <mnot@mnot.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org HTTP" <hybi@ietf.org>
Subject: Re: [hybi] Questions and comments on draft-hybi-thewebsocketprotocol-10
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: Mon, 18 Jul 2011 08:54:10 -0000

2011/7/18 Mark Nottingham <mnot@mnot.net>et>:

> 2) The Upgrade token has no version; e.g., from the examples in 1.2:
>    Upgrade: websocket
> Why? The protocol version seems to be carried in the Sec-WebSocket-Version header; could it not be moved (or copied) to the upgrade token?

I agree. But such version must be the definitive version (rather than
the draft revision or similar). So for example I suggest:

  Upgrade: websocket/1.0

The version "1.0" should not change in years until a complete new
WebSocket spec borns ("2.0").



> 4) Section 3 defines two new URI schemes for WebSockets, but the handshake is entirely HTTP-based, and the default ports are HTTP's. Why is a new URI scheme needed here? I understand that client software needs something to trigger the upgrade from, but why use the scheme, instead of (for example) the API? Is it expected that WS: URIs will be used in other places URIs are used, such as in HTML elements like A / IMG / SCRIPT, or in browser location bars?

An URI is useful as it tells you in a single line the transport to use
("ws" => TCP, "wss" => TLS over TCP), the domain to resolve (or IP)
and optionally the port (or default port 80/443 if not present). Also,
in case of including DNS SRV support [*] an URI is the best way to
extract the data to query.

[*] http://tools.ietf.org/html/draft-ibc-websocket-dns-srv-02



> Having two URL schemes use the same default port doesn't feel right.

That's not true. Current websocket draft states that "ws" schema uses
port 80 by default while "wss" uses 443 (unless explicitly present in
the URI).



> 6) In section 9.1., private-use-token is defined as having an "x-" prefix. This goes against emerging BCP, see draft-saintandre-xdash.

I agree. "Those Who Ignore History are Doomed to Repeat It".
I expect authors would take care of it.


-- 
Iñaki Baz Castillo
<ibc@aliax.net>