Skip to content

Commit

Permalink
Fix WebSocket request processing for IE10/11 (sends "Websocket" inste…
Browse files Browse the repository at this point in the history
…ad of "websocket").
  • Loading branch information
s-ludwig committed Dec 21, 2013
1 parent 24ce22a commit a580f95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/vibe/http/websockets.d
Expand Up @@ -83,11 +83,12 @@ HTTPServerRequestDelegate handleWebSockets(void delegate(WebSocket) on_handshake
}
}
if( !(isUpgrade &&
pUpgrade && *pUpgrade == "websocket" &&
pUpgrade && icmp(*pUpgrade, "websocket") == 0 &&
pKey &&
pVersion && *pVersion == "13") )
{
res.statusCode = HTTPStatus.BadRequest;
logDebug("Browser sent invalid WebSocket request.");
res.statusCode = HTTPStatus.badRequest;
res.writeVoidBody();
return;
}
Expand Down

0 comments on commit a580f95

Please sign in to comment.