[Modify] Polish it
This commit is contained in:
parent
605ae9173e
commit
45db0ea477
@ -583,19 +583,23 @@ namespace WebSocketSharp.Net
|
||||
private void finishInitialization10 ()
|
||||
{
|
||||
var transferEnc = _headers["Transfer-Encoding"];
|
||||
|
||||
if (transferEnc != null) {
|
||||
_context.ErrorMessage = "Invalid Transfer-Encoding header";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (_httpMethod == "POST") {
|
||||
if (_contentLength == -1) {
|
||||
_context.ErrorMessage = "Content-Length header required";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (_contentLength == 0) {
|
||||
_context.ErrorMessage = "Invalid Content-Length header";
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user