specification icon indicating copy to clipboard operation
specification copied to clipboard

Indicate Solid protocol to the WebSocket interface

Open csarven opened this issue 5 years ago • 4 comments

If WebsSocket is supported ( #50 ), Solid-specific protocol (+version) should be agreed for the WebSocket connection.

There is an experimental PR in https://github.com/solid/solid-spec/pull/220 for the purpose of updating the early documentation on WebSocket communication in Solid. It is intended to temporarily remedy feature support. This issue should reuse or build on that.

csarven avatar Apr 07 '20 09:04 csarven

The former solid-spec repository describes using the following subprotocol when connecting to a WebSocket server: solid/0.1.0-alpha. For example:

const socket = new WebSocket('wss://example.org', ['solid/0.1.0-alpha']);

However, Chrome browsers do not accept subprotocols that contain slashes. And FireFox simply ignores subprotocols that contain slashes. When the Solid specification defines a (versioned) subprotocol for Solid, it would be best if that subprotocol does not contain slashes.

There are work-arounds for the solid/0.1.0-alpha subprotocol, but they all involve deviating from that recommendation (e.g. solid.0.1.0-alpha)

acoburn avatar Jun 17 '20 13:06 acoburn

My preference is to use two digits in the versioning scheme: solid.0.1-alpha. Three digits makes sense for software but protocols tend to use only one or two digits.

acoburn avatar Jun 17 '20 14:06 acoburn

Dropping alpha is fine with me

acoburn avatar Jun 17 '20 17:06 acoburn

The former solid-spec repository describes using the following subprotocol when connecting to a WebSocket server: solid/0.1.0-alpha. For example:

const socket = new WebSocket('wss://example.org', ['solid/0.1.0-alpha']);

However, Chrome browsers do not accept subprotocols that contain slashes. And FireFox simply ignores subprotocols that contain slashes. When the Solid specification defines a (versioned) subprotocol for Solid, it would be best if that subprotocol does not contain slashes.

There are work-arounds for the solid/0.1.0-alpha subprotocol, but they all involve deviating from that recommendation (e.g. solid.0.1.0-alpha)

Based on the https://bugs.chromium.org/p/chromium/issues/detail?id=398407, it looks like Chrome is correct in not supporting slashes in the sub-protocol name.

WhyINeedToFillUsername avatar Jan 13 '21 20:01 WhyINeedToFillUsername