Re: Advertising WebSocket support in the HTTPS resource record

On Thu, 21 Oct 2021, 23:35 Ryan Hamilton, <rch@google.com> wrote:

> On Thu, Oct 21, 2021 at 11:10 AM Lucas Pardue <lucaspardue.24.7@gmail.com>
> wrote:
>
>> On Thu, Oct 21, 2021 at 6:46 PM David Schinazi <dschinazi.ietf@gmail.com>
>> wrote:
>>
>>> In theory, in terms of HTTP semantics, if someone mints wss://
>>> websocket.example.org and sends an h3 Alt-Svc for websocket.example.org,
>>> then that means that the client can use WebSocket over HTTP/3.
>>>
>>> However, in practice, as Stefan points out, that might not always hold.
>>> In the scenario where someone accidentally misconfigured their server by
>>> not having enough communication between h1/h2/h3, they can rectify the
>>> situation by replying with HTTP status code 421. That'll cause the client
>>> to fallback to an earlier version of HTTP.
>>>
>>
>> I don't think 421 is the right status here. The example I would actually
>> use is a document loaded from https://example.com/index.html that
>> includes wss://example.com/chat. If this is loaded via an H2 connection,
>> which supports extended connect for :protocol connect-udp but not
>> websocket, then the CONNECT request should fail but 421 is a status about
>> authority (generally caused by coalescing, a whole additional ballgame),
>> and there is no authority problem here. The client fallback to a fresh
>> connection would have to be careful to use HTTP/1.1.
>>
>
> For HTTP/2 I think instead of 421, we could use HTTP_1_1_REQUIRED. Does
> that sound right?
>

In H3, the equivalent error code is H3_VERSION_FALLBACK. These might
possibly work, but it makes a big assumption that HTTP/1.1 is the solution.
Stream errors in direct reaction to a syntactically valid request are
specced but can be a bit thorny to handle in implementations.

It could just be that one server instance that is authoritative, is not
able to serve the request at the time. As I said upthread, there seems to
be an omission of a status code or error code that articulates this simply,
and perhaps a header that could be used to carry the list of actual support
protocols (like Upgrade can do, but I think is prohibited in H2 or H3).

Received on Thursday, 21 October 2021 22:58:48 UTC