diff --git a/websocket-sharp/Net/HttpListenerRequest.cs b/websocket-sharp/Net/HttpListenerRequest.cs index 59df8889..b076c50e 100644 --- a/websocket-sharp/Net/HttpListenerRequest.cs +++ b/websocket-sharp/Net/HttpListenerRequest.cs @@ -590,7 +590,7 @@ namespace WebSocketSharp.Net _chunked = true; } - if (!_chunked && !_contentLengthSet) { + if (_contentLength == -1 && !_chunked) { if (_method == "POST" || _method == "PUT") { _context.ErrorMessage = String.Empty; _context.ErrorStatus = 411;