New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add subprotocols constructor argument to WebTransport #598
base: main
Are you sure you want to change the base?
Conversation
Meeting:
|
@@ -703,6 +708,11 @@ A {{WebTransport}} object has the following internal slots. | |||
<td class="non-normative">The number of concurrently open | |||
[=bidirectional=] streams the application anticipates the server creating, or null. | |||
</tr> | |||
<tr> | |||
<td><dfn>`[[Protocol]]`</dfn> | |||
<td class="non-normative">A string indicating the subprotocol selected by the server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a reference for "subprotocol"? I know that it's a websocket concept, so maybe that can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In WebSocket, the options-member is protocols, but refers to each string as a "subprotocol name" that has to "match the requirements for elements that comprise the value of Sec-WebSocket-Protocol
fields as defined by The WebSocket protocol. [WSP]"
WebSockets is mostly what I modeled this PR on. We could s/subprotocol/subprotocol name/ maybe if that helps?
I could also break out "subprotocol name" as a definition if that helps?
1. Let |protocols| be {{WebTransport/constructor(url, options)/options}}'s | ||
{{WebTransportOptions/protocols}} | ||
1. If any of the values in |protocols| occur more than once, fail to match | ||
the requirements for elements that comprise the value of `WebTransport-Subprotocol` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop the "sub" and use WebTransport-Protocol
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to be going the other way naming-wise judging from other feedback I've received.
But here specifically it needs to match ietf-wg-webtrans/draft-ietf-webtrans-http3#144 which is already merged.
[Section 4.1](https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-overview-06#section-4.1-2.2.1), | ||
with using |origin|, [=ASCII serialization of an origin|serialized=] and [=isomorphic encoded=], | ||
as the [:Origin:] header of the request. | ||
When establishing a session, the client MUST NOT provide any [=credentials=]. | ||
The resulting underlying transport stream is referred to as the session's <dfn>CONNECT stream</dfn>. | ||
Additionally, if the [=underlying connection=] is using HTTP/3 and the |protocols| array is non-empty, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that you mentioned only specifying this for HTTP/3 as it's only defined in that IETF doc, but I'm not sure if making this HTTP/3 specific is what we want. We should probably file an issue to get it added to the HTTP/2 or overview doc as well, and keep the language here as protocol-agnostic as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree this should be the goal. @nidhijaju or @vasilvv can you open this issue? But in the meantime, can we iterate here by merging what we have, and come back and fix this when it's available in the overview doc?
Co-authored-by: Nidhi Jaju <41948741+nidhijaju@users.noreply.github.com>
Meeting:
|
Fixes #536. Right now this seems only defined for HTTP/3, so that's what I went with. Is this what we want?
Preview | Diff