aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_stream_h.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-15 18:53:42 +0100
committerLoïc Hoguin <[email protected]>2018-11-15 18:53:42 +0100
commit240da3f2d9bc02611b23c1ea0e7bbe8db9d99cd8 (patch)
tree7c59e4ebd16731bab4fd9ac5deddb55a7762cf1c /src/cowboy_stream_h.erl
parentfbfec873f6026b858c3604d74d88470ce45f4296 (diff)
downloadcowboy-240da3f2d9bc02611b23c1ea0e7bbe8db9d99cd8.tar.gz
cowboy-240da3f2d9bc02611b23c1ea0e7bbe8db9d99cd8.tar.bz2
cowboy-240da3f2d9bc02611b23c1ea0e7bbe8db9d99cd8.zip
Add the set_options stream handler command
The first two options to benefit from this are the cowboy_compress_h options.
Diffstat (limited to 'src/cowboy_stream_h.erl')
-rw-r--r--src/cowboy_stream_h.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cowboy_stream_h.erl b/src/cowboy_stream_h.erl
index 55a1ca2..6c10517 100644
--- a/src/cowboy_stream_h.erl
+++ b/src/cowboy_stream_h.erl
@@ -227,6 +227,9 @@ info(StreamID, Push={push, _, _, _, _, _, _, _}, State) ->
do_info(StreamID, Push, [Push], State);
info(StreamID, SwitchProtocol={switch_protocol, _, _, _}, State) ->
do_info(StreamID, SwitchProtocol, [SwitchProtocol], State#state{expect=undefined});
+%% Convert the set_options message to a command.
+info(StreamID, SetOptions={set_options, _}, State) ->
+ do_info(StreamID, SetOptions, [SetOptions], State);
%% Unknown message, either stray or meant for a handler down the line.
info(StreamID, Info, State) ->
do_info(StreamID, Info, [], State).