From 2390007ffaf72e47d444ca26b721b046b9f43f02 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 19 Feb 2018 20:53:21 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpListenerRequest.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/websocket-sharp/Net/HttpListenerRequest.cs b/websocket-sharp/Net/HttpListenerRequest.cs index f6f9c957..c50a05c0 100644 --- a/websocket-sharp/Net/HttpListenerRequest.cs +++ b/websocket-sharp/Net/HttpListenerRequest.cs @@ -63,7 +63,6 @@ namespace WebSocketSharp.Net private HttpConnection _connection; private Encoding _contentEncoding; private long _contentLength; - private bool _contentLengthSet; private HttpListenerContext _context; private CookieCollection _cookies; private WebHeaderCollection _headers; @@ -678,7 +677,7 @@ namespace WebSocketSharp.Net } if (lower == "content-length") { - if (_contentLengthSet) { + if (_contentLength > -1) { _context.ErrorMessage = "Invalid Content-Length header"; return; } @@ -695,8 +694,6 @@ namespace WebSocketSharp.Net } _contentLength = len; - _contentLengthSet = true; - return; } }