Loïc Hoguin 8 лет назад
Родитель
Сommit
7e84719095
2 измененных файлов с 1 добавлено и 6 удалено
  1. 1 1
      src/cowboy_handler.erl
  2. 0 5
      src/cowboy_req.erl

+ 1 - 1
src/cowboy_handler.erl

@@ -54,7 +54,7 @@ execute(Req, Env=#{handler := Handler, handler_opts := HandlerOpts}) ->
 terminate(Reason, Req, State, Handler) ->
 	case erlang:function_exported(Handler, terminate, 3) of
 		true ->
-			Handler:terminate(Reason, cowboy_req:lock(Req), State);
+			Handler:terminate(Reason, Req, State);
 		false ->
 			ok
 	end.

+ 0 - 5
src/cowboy_req.erl

@@ -85,7 +85,6 @@
 -export([get/2]).
 -export([set/2]).
 -export([set_bindings/4]).
--export([lock/1]).
 
 -type cookie_opts() :: cow_cookie:cookie_opts().
 -export_type([cookie_opts/0]).
@@ -1066,10 +1065,6 @@ set_bindings(HostInfo, PathInfo, Bindings, Req) ->
 	Req#http_req{host_info=HostInfo, path_info=PathInfo,
 		bindings=Bindings}.
 
--spec lock(Req) -> Req when Req::req().
-lock(Req) ->
-	Req#http_req{resp_state=locked}.
-
 %% Internal.
 
 %% We don't match on "keep-alive" since it is the default value.