Skip to content

Commit

Permalink
fix: adding new line before key header
Browse files Browse the repository at this point in the history
this is to stop other headers ending in Sec-WebSocket-Key from breaking the index of
  • Loading branch information
James-Frowen committed Jun 7, 2022
1 parent f0c950c commit 3495845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Server/ServerHandshake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal class ServerHandshake
const int ResponseLength = 129;
internal const int KeyLength = 24;
const int MergedKeyLength = 60;
const string KeyHeaderString = "Sec-WebSocket-Key: ";
const string KeyHeaderString = "\r\nSec-WebSocket-Key: ";
// this isn't an official max, just a reasonable size for a websocket handshake
readonly int maxHttpHeaderSize = 3000;

Expand Down

0 comments on commit 3495845

Please sign in to comment.