mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Honor the SETTINGS_ENABLE_PUSH from clients
This fixes curl when fetching resources that use push.
This commit is contained in:
parent
204fa12df8
commit
ae6c787062
2 changed files with 33 additions and 15 deletions
|
@ -706,6 +706,10 @@ commands(State0, Stream0=#stream{local=nofin, te=TE0}, [{trailers, Trailers}|Tai
|
|||
% [{sendfile, IsFin, Offset, Bytes, Path}|Tail]) ->
|
||||
% {State, Stream} = send_data(State0, Stream0, IsFin, {sendfile, Offset, Bytes, Path}),
|
||||
% commands(State, Stream, Tail);
|
||||
%% Push promises are not sent to clients who disabled them.
|
||||
commands(State=#state{remote_settings=#{enable_push := false}}, Stream,
|
||||
[{push, _, _, _, _, _, _, _}|Tail]) ->
|
||||
commands(State, Stream, Tail);
|
||||
%% Send a push promise.
|
||||
%%
|
||||
%% @todo We need to keep track of what promises we made so that we don't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue