[Fix] LWS is refused

This commit is contained in:
sta 2018-03-17 18:09:30 +09:00
parent ca63816128
commit 0e75c9fddd

View File

@ -626,6 +626,12 @@ namespace WebSocketSharp.Net
internal void AddHeader (string headerField)
{
var start = headerField[0];
if (start == ' ' || start == '\t') {
_context.ErrorMessage = "Invalid header field";
return;
}
var colon = headerField.IndexOf (':');
if (colon < 1) {
_context.ErrorMessage = "Invalid header field";