[Modify] Polish it
This commit is contained in:
parent
ffda43c459
commit
2390007ffa
@ -63,7 +63,6 @@ namespace WebSocketSharp.Net
|
|||||||
private HttpConnection _connection;
|
private HttpConnection _connection;
|
||||||
private Encoding _contentEncoding;
|
private Encoding _contentEncoding;
|
||||||
private long _contentLength;
|
private long _contentLength;
|
||||||
private bool _contentLengthSet;
|
|
||||||
private HttpListenerContext _context;
|
private HttpListenerContext _context;
|
||||||
private CookieCollection _cookies;
|
private CookieCollection _cookies;
|
||||||
private WebHeaderCollection _headers;
|
private WebHeaderCollection _headers;
|
||||||
@ -678,7 +677,7 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lower == "content-length") {
|
if (lower == "content-length") {
|
||||||
if (_contentLengthSet) {
|
if (_contentLength > -1) {
|
||||||
_context.ErrorMessage = "Invalid Content-Length header";
|
_context.ErrorMessage = "Invalid Content-Length header";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -695,8 +694,6 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
|
|
||||||
_contentLength = len;
|
_contentLength = len;
|
||||||
_contentLengthSet = true;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user