[Modify] Polish it

This commit is contained in:
sta 2018-02-18 17:49:49 +09:00
parent 7e67cf540c
commit ffda43c459

View File

@ -77,7 +77,6 @@ namespace WebSocketSharp.Net
private Uri _urlReferrer; private Uri _urlReferrer;
private bool _urlSet; private bool _urlSet;
private string _userHostName; private string _userHostName;
private bool _userHostNameSet;
private string[] _userLanguages; private string[] _userLanguages;
private bool _websocketRequest; private bool _websocketRequest;
private bool _websocketRequestSet; private bool _websocketRequestSet;
@ -664,7 +663,7 @@ namespace WebSocketSharp.Net
var lower = name.ToLower (CultureInfo.InvariantCulture); var lower = name.ToLower (CultureInfo.InvariantCulture);
if (lower == "host") { if (lower == "host") {
if (_userHostNameSet) { if (_userHostName != null) {
_context.ErrorMessage = "Invalid Host header"; _context.ErrorMessage = "Invalid Host header";
return; return;
} }
@ -675,8 +674,6 @@ namespace WebSocketSharp.Net
} }
_userHostName = val; _userHostName = val;
_userHostNameSet = true;
return; return;
} }