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

Remove two unneeded Req modifications

This commit is contained in:
Loïc Hoguin 2012-09-15 12:56:45 +02:00
parent d9e76d59a1
commit 9b5cbb5000

View file

@ -164,7 +164,7 @@ websocket_handshake(State=#state{version=0, origin=Origin,
[{<<"Upgrade">>, <<"WebSocket">>},
{<<"Sec-Websocket-Location">>, Location},
{<<"Sec-Websocket-Origin">>, Origin}],
Req#http_req{resp_state=waiting}),
Req),
%% Flush the resp_sent message before moving on.
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
%% We replied with a proper response. Proxies should be happy enough,
@ -191,7 +191,7 @@ websocket_handshake(State=#state{challenge=Challenge},
101,
[{<<"Upgrade">>, <<"websocket">>},
{<<"Sec-Websocket-Accept">>, Challenge}],
Req#http_req{resp_state=waiting}),
Req),
%% Flush the resp_sent message before moving on.
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
handler_before_loop(State#state{messages=Transport:messages()},