[Modify] Polish it

This commit is contained in:
sta 2018-01-08 16:37:05 +09:00
parent 99bb6189ce
commit 1b3622d624

View File

@ -516,7 +516,12 @@ namespace WebSocketSharp.Net
if (lower == "content-length") {
long len;
if (!Int64.TryParse (val, out len) || len < 0) {
if (!Int64.TryParse (val, out len)) {
_context.ErrorMessage = "Invalid Content-Length header";
return;
}
if (len < 0) {
_context.ErrorMessage = "Invalid Content-Length header";
return;
}