aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_protocol.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index 9bb22c3..d950373 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -130,8 +130,9 @@ header(http_eoh, Req, State) ->
handler_init(Req, State).
-spec handler_init(Req::#http_req{}, State::#state{}) -> ok.
-handler_init(Req, State=#state{handler={Handler, Opts}}) ->
- case catch Handler:init(Req, Opts) of
+handler_init(Req, State=#state{
+ transport=Transport, handler={Handler, Opts}}) ->
+ case catch Handler:init({Transport:name(), http}, Req, Opts) of
{ok, Req, HandlerState} ->
handler_loop(HandlerState, Req, State);
%% @todo {upgrade, transport, Module}; {upgrade, protocol, Module}