mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +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">>},
|
[{<<"Upgrade">>, <<"WebSocket">>},
|
||||||
{<<"Sec-Websocket-Location">>, Location},
|
{<<"Sec-Websocket-Location">>, Location},
|
||||||
{<<"Sec-Websocket-Origin">>, Origin}],
|
{<<"Sec-Websocket-Origin">>, Origin}],
|
||||||
Req#http_req{resp_state=waiting}),
|
Req),
|
||||||
%% Flush the resp_sent message before moving on.
|
%% Flush the resp_sent message before moving on.
|
||||||
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
|
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
|
||||||
%% We replied with a proper response. Proxies should be happy enough,
|
%% We replied with a proper response. Proxies should be happy enough,
|
||||||
|
@ -191,7 +191,7 @@ websocket_handshake(State=#state{challenge=Challenge},
|
||||||
101,
|
101,
|
||||||
[{<<"Upgrade">>, <<"websocket">>},
|
[{<<"Upgrade">>, <<"websocket">>},
|
||||||
{<<"Sec-Websocket-Accept">>, Challenge}],
|
{<<"Sec-Websocket-Accept">>, Challenge}],
|
||||||
Req#http_req{resp_state=waiting}),
|
Req),
|
||||||
%% Flush the resp_sent message before moving on.
|
%% Flush the resp_sent message before moving on.
|
||||||
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
|
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
|
||||||
handler_before_loop(State#state{messages=Transport:messages()},
|
handler_before_loop(State#state{messages=Transport:messages()},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue