aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-22 17:30:05 +0100
committerLoïc Hoguin <[email protected]>2013-01-22 17:30:05 +0100
commitbcb1222df99f11a55159a591b75c6995905bd4b9 (patch)
tree6c2397bd32b8eec7a9ee4f14a3d14582c1712de1 /src
parentca98a86b30ca62e706a05c7cf83018471dce0fe3 (diff)
parent9aa0e1a58a0a9148237bd0f974507bcd914f7ef4 (diff)
downloadcowboy-bcb1222df99f11a55159a591b75c6995905bd4b9.tar.gz
cowboy-bcb1222df99f11a55159a591b75c6995905bd4b9.tar.bz2
cowboy-bcb1222df99f11a55159a591b75c6995905bd4b9.zip
Merge branch 'fix_change_state' of https://github.com/nevar/cowboy
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_rest.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl
index f5bc22d..6816303 100644
--- a/src/cowboy_rest.erl
+++ b/src/cowboy_rest.erl
@@ -740,13 +740,13 @@ choose_content_type(Req,
"** Request was ~p~n** State was ~p~n~n",
[Handler, Fun, 2, cowboy_req:to_list(Req), HandlerState]),
{error, 500, Req};
- {halt, Req2, HandlerState} ->
- terminate(Req2, State#state{handler_state=HandlerState});
- {true, Req2, HandlerState} ->
- State2 = State#state{handler_state=HandlerState},
+ {halt, Req2, HandlerState2} ->
+ terminate(Req2, State#state{handler_state=HandlerState2});
+ {true, Req2, HandlerState2} ->
+ State2 = State#state{handler_state=HandlerState2},
next(Req2, State2, OnTrue);
- {false, Req2, HandlerState} ->
- State2 = State#state{handler_state=HandlerState},
+ {false, Req2, HandlerState2} ->
+ State2 = State#state{handler_state=HandlerState2},
respond(Req2, State2, 500)
end;
choose_content_type(Req, State, OnTrue, ContentType, [_Any|Tail]) ->
@@ -791,10 +791,10 @@ set_resp_body(Req, State=#state{handler=Handler, handler_state=HandlerState,
"** Request was ~p~n** State was ~p~n~n",
[Handler, Fun, 2, cowboy_req:to_list(Req5), HandlerState]),
{error, 500, Req5};
- {halt, Req6, HandlerState} ->
- terminate(Req6, State4#state{handler_state=HandlerState});
- {Body, Req6, HandlerState} ->
- State5 = State4#state{handler_state=HandlerState},
+ {halt, Req6, HandlerState2} ->
+ terminate(Req6, State4#state{handler_state=HandlerState2});
+ {Body, Req6, HandlerState2} ->
+ State5 = State4#state{handler_state=HandlerState2},
Req7 = case Body of
{stream, StreamFun} ->
cowboy_req:set_resp_body_fun(StreamFun, Req6);