W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: Allow custom headers (Websocket API)

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 05 Feb 2015 14:48:20 +0100
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Florian Bösch <pyalot@gmail.com>, Michiel De Mey <de.mey.michiel@gmail.com>, WebApps WG <public-webapps@w3.org>
Message-ID: <qfs6da15ballebvggv6om0a0hv3k3ema0u@hive.bjoern.hoehrmann.de>
* Anne van Kesteren wrote:
>On Thu, Feb 5, 2015 at 2:29 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
>> It seems to me that "pre-flight" requests would happen prior to opening
>> a Websocket connection, i.e. before requirements of the Websocket proto-
>> col apply, so this would have to be covered by the API specification in-
>> stead. I do not really see why the Websocket on-the-wire protocol would
>> have to be changed here.
>
>Wouldn't that require the endpoint to support two protocols? That
>sounds suboptimal.

A Websocket connection is established by making a HTTP Upgrade request,
and the protocol is HTTP unless and until the connection is upgraded.
Websocket endpoints already have to be robust against XHR pre-flight
requests and other HTTP requests and "custom headers" would be an opt-
in feature anyway, so it's not obvious that there would be any problem.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
D-10243 Berlin · PGP Pub. KeyID: 0xA4357E78 · http://www.bjoernsworld.de
 Available for hire in Berlin (early 2015)  · http://www.websitedev.de/ 
Received on Thursday, 5 February 2015 13:48:54 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC