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

Iñaki Baz Castillo <> Mon, 18 July 2011 08:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 75C3E21F8B64 for <>; Mon, 18 Jul 2011 01:54:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.665
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 08iyJJxvMrou for <>; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id B418B21F8ACE for <>; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
Received: by qwc23 with SMTP id 23so2392416qwc.31 for <>; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
MIME-Version: 1.0
Received: by with SMTP id y36mr4574253qce.227.1310979249056; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
Received: by with HTTP; Mon, 18 Jul 2011 01:54:09 -0700 (PDT)
In-Reply-To: <>
References: <>
Date: Mon, 18 Jul 2011 10:54:09 +0200
Message-ID: <>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <>
To: Mark Nottingham <>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: " HTTP" <>
Subject: Re: [hybi] Questions and comments on draft-hybi-thewebsocketprotocol-10
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 18 Jul 2011 08:54:10 -0000

2011/7/18 Mark Nottingham <>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.


> 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