|
|
|
@ -676,10 +676,8 @@ namespace WebSocketSharp.Net
|
|
|
|
|
|
|
|
|
|
|
|
internal void FinishInitialization ()
|
|
|
|
internal void FinishInitialization ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var host = _headers["Host"];
|
|
|
|
if (_protocolVersion > HttpVersion.Version10 && !_userHostNameSet) {
|
|
|
|
var hasHost = host != null && host.Length > 0;
|
|
|
|
_context.ErrorMessage = "No Host header";
|
|
|
|
if (_protocolVersion > HttpVersion.Version10 && !hasHost) {
|
|
|
|
|
|
|
|
_context.ErrorMessage = "Invalid Host header";
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|