[Modify] Replace it

This commit is contained in:
sta 2020-05-27 19:54:00 +09:00
parent c4a9a4fc0f
commit 10f2d273bf

View File

@ -1815,7 +1815,23 @@ namespace WebSocketSharp.Net
/// </exception> /// </exception>
public override void Set (string name, string value) public override void Set (string name, string value)
{ {
doWithCheckingState (setWithoutCheckingName, checkName (name), value, true); name = checkName (name);
value = checkValue (value);
checkRestricted (name);
checkAllowed (name);
base.Set (name, value);
if (_state != HttpHeaderType.Unspecified)
return;
var headerType = getHeaderType (name);
if (headerType == HttpHeaderType.Unspecified)
return;
_state = headerType;
} }
/// <summary> /// <summary>