[Modify] Add a check if response or not
This commit is contained in:
parent
68036554db
commit
f7283c0043
@ -842,7 +842,10 @@ namespace WebSocketSharp.Net
|
|||||||
if (_internallyUsed)
|
if (_internallyUsed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isRestricted (name, true)) {
|
var headerType = getHeaderType (name);
|
||||||
|
var res = headerType == HttpHeaderType.Response;
|
||||||
|
|
||||||
|
if (isRestricted (name, res)) {
|
||||||
var msg = "This header must be modified with the appropiate property.";
|
var msg = "This header must be modified with the appropiate property.";
|
||||||
|
|
||||||
throw new ArgumentException (msg);
|
throw new ArgumentException (msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user