* Anne van Kesteren wrote: >On Thu, Feb 5, 2015 at 2:29 PM, Bjoern Hoehrmann <derhoe...@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:bjo...@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/