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