Closed Bug 2007150 Opened 7 months ago Closed 14 days ago

Implement application-level protocol negotation at WebTransport session start

Categories

(Core :: Networking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: jesup, Assigned: jesup, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged], [wptsync upstream])

Attachments

(6 files)

From the spec: section 6.2 items 14, 15 and 32:

Let protocols be options’s protocols

If any of the values in protocols occur more than once, fail to match the requirements for elements that comprise the value of the negotiated application protocol as defined by the WebTransport protocol, or have an isomorphic encoded length of 0 or exceeding 512, throw a SyntaxError exception. [WEB-TRANSPORT-OVERVIEW] Section 3.1.
If protocols is not empty, set a structured field value with (WT-Available-Protocols, a structured header list whose members are the structured header string items in protocols in order) in request’s header list.

and later in To process a WebTransport fetch response, item 5:

Set transport.[[Protocol]] to either the string value of the negotiated application protocol if present, following [WEB-TRANSPORT-OVERVIEW] Section 3.1, or "" if not present.

and in WebTransportOptions:

protocols, of type sequence<DOMString>, defaulting to []

    An optionally provided array of application-level protocol names. Selecting a preferred application-protocol and communicating it to the client is optional for the server. Servers might reject the request if a suitable protocol was not provided.
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Assignee: nobody → rjesup
Attachment #9534312 - Attachment description: WIP: Bug 2007150: Add protocols option to WebTransportOptions - partial DOM-only impl r=#necko-reviewers!,#dom-reviewers! → Bug 2007150: Add protocols option to WebTransportOptions - partial DOM-only impl r=#dom-core!
Status: NEW → ASSIGNED

IPC Layer (PBackground.ipdl) - Added nsString[] aProtocols parameter to CreateWebTransportParent
DOM Layer (WebTransport.cpp) - Extracted protocols from JavaScript API options and passed them through IPC at WebTransport.cpp:260-269, 386-390
Parent Process (BackgroundParentImpl.h/cpp, WebTransportParent.h/cpp) - Updated to receive and forward protocols through the IPC chain
Network Layer (nsIWebTransport.idl, WebTransportSessionProxy.cpp) -
Added protocols parameter to AsyncConnectWithClient interface
Implemented code to format and send wt-available-protocols HTTP header in the correct format: "protocol1", "protocol2", "protocol3"

Attachment #9553038 - Attachment description: Bug 2007150: Update wpts for WebTransport sub-protocol negotiation r=#necko-reviewers! → Bug 2007150: Update wpts for WebTransport sub-protocol negotiation r=jib!
Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/061cafdb376a https://hg.mozilla.org/integration/autoland/rev/4e63d4f5ddb3 Add protocols option to WebTransportOptions - partial DOM-only impl r=webidl,saschanaz,necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/20658c62af8e https://hg.mozilla.org/integration/autoland/rev/b27d9aeacffd Get the negotiated protocol from neqo for WebTransport r=necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/9cc90dea3e01 https://hg.mozilla.org/integration/autoland/rev/dfe47a253102 Hook up WebTransport sub-protocol negotiation r=necko-reviewers,dom-core-reviewers,smaug,valentin,ipc-reviewers https://github.com/mozilla-firefox/firefox/commit/679e60c8d317 https://hg.mozilla.org/integration/autoland/rev/37fe0e600501 next step hooking up WebTransport sub-protocol support r=necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/3b5a94722152 https://hg.mozilla.org/integration/autoland/rev/731b83856d16 Update wpts for WebTransport sub-protocol negotiation r=necko-reviewers,valentin

Backed out for causing build bustages
Backout link
Push with failures
Failure log(s)

Flags: needinfo?(rjesup)

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61598 for changes under testing/web-platform/tests

Whiteboard: [necko-triaged] → [necko-triaged], [wptsync upstream]
Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9cddc6771da5 https://hg.mozilla.org/integration/autoland/rev/716fd77534a8 Add protocols option to WebTransportOptions - partial DOM-only impl r=webidl,saschanaz,necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/41285e82c18a https://hg.mozilla.org/integration/autoland/rev/d13db66deb44 Get the negotiated protocol from neqo for WebTransport r=necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/b49b2937dd58 https://hg.mozilla.org/integration/autoland/rev/698d6499034d Hook up WebTransport sub-protocol negotiation r=necko-reviewers,dom-core-reviewers,smaug,valentin,ipc-reviewers https://github.com/mozilla-firefox/firefox/commit/3057bd81e41a https://hg.mozilla.org/integration/autoland/rev/d7814c57d1f6 next step hooking up WebTransport sub-protocol support r=necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/3e5f11729ba2 https://hg.mozilla.org/integration/autoland/rev/81156b4bbe84 Update wpts for WebTransport sub-protocol negotiation r=necko-reviewers,valentin

Upstream PR merged by moz-wptsync-bot

Whiteboard: [necko-triaged], [wptsync upstream] → [necko-triaged], [wptsync upstream error]
Whiteboard: [necko-triaged], [wptsync upstream error] → [necko-triaged], [wptsync upstream]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: