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:
parent
d9e76d59a1
commit
9b5cbb5000
1 changed files with 2 additions and 2 deletions
|
@ -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()},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue