[Modify] Polish it
This commit is contained in:
parent
99bb6189ce
commit
1b3622d624
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user