Skip to content
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

removes updating the connection encode_context on trailer encoding #4

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/h2_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ handle_event(_, {send_trailers, StreamId, Headers, Opts},
Stream = h2_stream_set:get(StreamId, Streams),
case h2_stream_set:type(Stream) of
active ->
{FramesToSend, NewContext} =
{FramesToSend, _NewContext} =
h2_frame_headers:to_frames(h2_stream_set:stream_id(Stream),
Headers,
EncodeContext,
Expand All @@ -1027,7 +1027,12 @@ handle_event(_, {send_trailers, StreamId, Headers, Opts},
send_t(Stream, Headers),
{keep_state,
Conn#connection{
encode_context=NewContext,
%% TODO: updating the hpack encoding is removed while trailers are
%% broken. Currently they can be sent in a different order than they
%% were encoded. A refactor to have the encoding not happen until
%% the sending is actually done is required to allow for the table
%% to be updated by trailer encoding.
%% encode_context=NewContext,
send_window_size=NewSWS,
streams=NewStreams
}};
Expand Down