0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Make the return value of AcceptResource callback consistent

This commit is contained in:
Loïc Hoguin 2013-05-16 15:14:11 +02:00
parent 28186a68d0
commit 934393a168
2 changed files with 2 additions and 2 deletions

View file

@ -842,7 +842,7 @@ process_content_type(Req, State=#state{method=Method,
{false, Req2, HandlerState2} ->
State2 = State#state{handler_state=HandlerState2},
respond(Req2, State2, 422);
{ResURL, Req2, HandlerState2} when Method =:= <<"POST">> ->
{{true, ResURL}, Req2, HandlerState2} when Method =:= <<"POST">> ->
State2 = State#state{handler_state=HandlerState2},
Req3 = cowboy_req:set_resp_header(
<<"location">>, ResURL, Req2),

View file

@ -28,4 +28,4 @@ to_text(Req, State) ->
from_text(Req, State) ->
{Path, Req2} = cowboy_req:path(Req),
{Path, Req2, State}.
{{true, Path}, Req2, State}.