Skip to content

Commit

Permalink
[webtransport] Set ENABLE_CONNECT_PROTOCOL settings flag (web-platfor…
Browse files Browse the repository at this point in the history
…m-tests#31573)

This is required to use an Extended CONNECT method. WebTransport
uses an Extended CONNECT method.
  • Loading branch information
bashi authored and Gabisampaio committed Nov 18, 2021
1 parent 1f117ee commit 516384a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/webtransport/h3/webtransport_h3_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class H3ConnectionWithDatagram04(H3Connection):
HTTP Datagram protocol.
"""
H3_DATAGRAM_04 = 0xffd277
# https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-h3-websockets-00#section-5
ENABLE_CONNECT_PROTOCOL = 0x08

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
Expand All @@ -58,6 +60,7 @@ def _get_local_settings(self) -> Dict[int, int]:
H3_DATAGRAM_04 = H3ConnectionWithDatagram04.H3_DATAGRAM_04
settings = super()._get_local_settings()
settings[H3_DATAGRAM_04] = 1
settings[H3ConnectionWithDatagram04.ENABLE_CONNECT_PROTOCOL] = 1
return settings

@property
Expand Down

0 comments on commit 516384a

Please sign in to comment.