aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-04-12 16:21:57 +0200
committerLoïc Hoguin <[email protected]>2011-04-12 16:22:46 +0200
commit73b120b68ec454963d02c06153d9e9f2b39840f9 (patch)
tree3ba52d502bedebd27fcc763bc7c8af5e0540e9aa /src
parent0ef66b78f708d6f6f169649cbea76fabfa34f875 (diff)
downloadcowboy-73b120b68ec454963d02c06153d9e9f2b39840f9.tar.gz
cowboy-73b120b68ec454963d02c06153d9e9f2b39840f9.tar.bz2
cowboy-73b120b68ec454963d02c06153d9e9f2b39840f9.zip
Fix a pattern matching bug in cowboy_http_protocol:handler_init/2.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_protocol.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index b0fef0d..aa1df39 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -142,8 +142,8 @@ header({http_error, _String}, _Req, State) ->
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);
+ {ok, Req2, HandlerState} ->
+ handler_loop(HandlerState, Req2, State);
%% @todo {upgrade, transport, Module}
{upgrade, protocol, Module} ->
Module:upgrade(Handler, Opts, Req);