diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index 6f10d8ec..299b3718 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -371,7 +371,7 @@ namespace WebSocketSharp.Net if (_inputState == InputState.RequestLine) continue; - if (_position > 32768) + if (_position > _maxInputLength) _context.ErrorMessage = "Headers too long"; return true; @@ -395,7 +395,7 @@ namespace WebSocketSharp.Net return true; } - if (_position >= 32768) { + if (_position >= _maxInputLength) { _context.ErrorMessage = "Headers too long"; return true;