diff options
-rw-r--r-- | src/cowboy_rest.erl | 2 | ||||
-rw-r--r-- | test/http_SUITE_data/rest_forbidden_resource.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index b44ccef..494a1e3 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -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), diff --git a/test/http_SUITE_data/rest_forbidden_resource.erl b/test/http_SUITE_data/rest_forbidden_resource.erl index 287ff62..920ba31 100644 --- a/test/http_SUITE_data/rest_forbidden_resource.erl +++ b/test/http_SUITE_data/rest_forbidden_resource.erl @@ -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}. |