0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Update to most recent WebTransport draft
Some checks failed
Check Cowboy / Cleanup master build (push) Has been cancelled
Check Cowboy / Check examples (push) Has been cancelled
Check Cowboy / Cowboy (push) Has been cancelled

WEBTRANSPORT -> WT in most places. Only ENABLE_WEBTRANSPORT
remains (since it is a draft-02 setting that was later removed)
as well as internal functions and atoms about stream headers,
for greater clarity.

The draft also clarified that WT_SESSION_GONE can be sent on
the session stream and since it's what is already done a
related todo was removed.
This commit is contained in:
Loïc Hoguin 2025-06-25 11:47:25 +02:00
parent 5ec0eeb4d4
commit a8c717718a
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
3 changed files with 25 additions and 26 deletions

View file

@ -973,7 +973,6 @@ wt_commands(State0=#state{conn=Conn}, Session=#stream{id=SessionID}, [Cmd|Tail])
Capsule = cow_capsule:wt_close_session(AppCode, AppMsg),
case cowboy_quicer:send(Conn, SessionID, Capsule, fin) of
ok ->
%% @todo The endpoint MAY send a STOP_SENDING to indicate it is no longer reading from the CONNECT stream.
State = webtransport_terminate_session(State0, Session),
%% @todo Because the handler is in a separate process
%% we must wait for it to stop and eventually
@ -994,7 +993,7 @@ webtransport_terminate_session(State=#state{conn=Conn, http3_machine=HTTP3Machin
(StreamID, #stream{status={webtransport_stream, StreamSessionID}})
when StreamSessionID =:= SessionID ->
cowboy_quicer:shutdown_stream(Conn, StreamID,
both, cow_http3:error_to_code(webtransport_session_gone)),
both, cow_http3:error_to_code(wt_session_gone)),
false;
(_, _) ->
true