Skip to content

Commit

Permalink
Do not require the optional "Origin" field for WebSocket requests. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Nov 20, 2013
1 parent 95dfa2e commit e11b588
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions source/vibe/http/websockets.d
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ HTTPServerRequestDelegate handleWebSockets(void delegate(WebSocket) on_handshake
auto pUpgrade = "Upgrade" in req.headers;
auto pConnection = "Connection" in req.headers;
auto pKey = "Sec-WebSocket-Key" in req.headers;
auto pOrigin = "Origin" in req.headers;
auto pProtocol = "Sec-WebSocket-Protocol" in req.headers;
auto pVersion = "Sec-WebSocket-Version" in req.headers;

Expand All @@ -84,7 +83,6 @@ HTTPServerRequestDelegate handleWebSockets(void delegate(WebSocket) on_handshake
}
}
if( !(isUpgrade &&
pOrigin &&
pUpgrade && *pUpgrade == "websocket" &&
pKey &&
pVersion && *pVersion == "13") )
Expand Down

0 comments on commit e11b588

Please sign in to comment.