anchor.diff:      {state, HandlerState}
     ]).
   
  -proxy_terminate(Req, #state{handler=Handler, handler_state=HandlerState}) ->
  +proxy_terminate(Req, #state{handler = Handler, handler_state = HandlerState}) ->
     case erlang:function_exported(Handler, proxy_terminate, 2) of
       true -> ok = Handler:proxy_terminate(
         cowboy_req:lock(Req), HandlerState);
  
positive.code:   ok = gun:close(Conn),
    {ok, Req, [{result, ok}|Env]}.
  
  error_terminate(Req, State=#state{handler=Handler, handler_state=HandlerState},
  		Class, Reason, Callback, Arity) ->
    proxy_terminate(Req, State),
    cowboy_req:maybe_reply(500, Req),
  
negative.code:     true ->
        try Handler:proxy_init(Req, HandlerOpts) of
          {ok, Req2, HandlerState} ->
            backend(Req2, #state{env = Env, method = Method, req_headers = filter_headers(Headers, []),
              handler = Handler, handler_state = HandlerState})
        catch Class:Reason ->
          error_terminate(Req, #state{handler = Handler, handler_state = HandlerOpts},
  