From 5e80e4baaca6ca866555a62db96b8e2623050521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 18 Mar 2011 01:52:46 +0100 Subject: Handler:init/2 should also return the Request in case it changed. --- src/cowboy_http_protocol.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index da10411..594699d 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -111,7 +111,7 @@ header(http_eoh, Req, State) -> -spec handler_init(Req::#http_req{}, State::#state{}) -> ok. handler_init(Req, State=#state{handler={Handler, Opts}}) -> case Handler:init(Req, Opts) of - {ok, HandlerState} -> + {ok, Req, HandlerState} -> handler_loop(HandlerState, Req, State) %% @todo {mode, active}; {upgrade_protocol, Module}; {error, Reason} end. -- cgit v1.2.3