diff options
author | Loïc Hoguin <[email protected]> | 2017-05-31 12:48:22 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-05-31 12:48:22 +0200 |
commit | 18e2d684b3f810c7386a921d837e6dbca47e4b15 (patch) | |
tree | 666235cf43d720cb2f6b134d9edf07744fcf0bb4 /src | |
parent | 5f421f93bc36d73161f7aa8705da5ea3a3793807 (diff) | |
download | cowboy-18e2d684b3f810c7386a921d837e6dbca47e4b15.tar.gz cowboy-18e2d684b3f810c7386a921d837e6dbca47e4b15.tar.bz2 cowboy-18e2d684b3f810c7386a921d837e6dbca47e4b15.zip |
Apply the received SETTINGS frame
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_http2.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl index 0661296..daaffed 100644 --- a/src/cowboy_http2.erl +++ b/src/cowboy_http2.erl @@ -359,10 +359,10 @@ frame(State=#state{client_streamid=LastStreamID}, {rst_stream, StreamID, _}) frame(State, {rst_stream, StreamID, Reason}) -> stream_terminate(State, StreamID, {stream_error, Reason, 'Stream reset requested by client.'}); %% SETTINGS frame. -frame(State=#state{socket=Socket, transport=Transport}, {settings, _Settings}) -> - %% @todo Apply SETTINGS. +frame(State=#state{socket=Socket, transport=Transport, remote_settings=Settings0}, + {settings, Settings}) -> Transport:send(Socket, cow_http2:settings_ack()), - State; + State#state{remote_settings=maps:merge(Settings0, Settings)}; %% Ack for a previously sent SETTINGS frame. frame(State=#state{next_settings=_NextSettings}, settings_ack) -> %% @todo Apply SETTINGS that require synchronization. |