|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|