0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Make reply functions return Req

This commit is contained in:
Loïc Hoguin 2016-08-10 17:15:02 +02:00
parent aa6f2ab5a4
commit e30d120bd8
16 changed files with 109 additions and 108 deletions

View file

@ -79,8 +79,8 @@ upgrade(Req, Env, Handler, HandlerState, Timeout, Hibernate) ->
websocket_handshake(State2, Req2, HandlerState, Env)
catch _:_ ->
%% @todo Test that we can have 2 /ws 400 status code in a row on the same connection.
cowboy_req:reply(400, Req),
{ok, Req, Env}
%% @todo Does this even work?
{ok, cowboy_req:reply(400, Req), Env}
end.
-spec websocket_upgrade(#state{}, Req)