diff --git a/websocket-sharp/Net/HttpHeaderInfo.cs b/websocket-sharp/Net/HttpHeaderInfo.cs index d6775ccd..1a56eb2c 100644 --- a/websocket-sharp/Net/HttpHeaderInfo.cs +++ b/websocket-sharp/Net/HttpHeaderInfo.cs @@ -112,7 +112,9 @@ namespace WebSocketSharp.Net public bool IsRestricted (bool response) { - return (_headerType & HttpHeaderType.Restricted) == HttpHeaderType.Restricted + var headerType = _headerType & HttpHeaderType.Restricted; + + return headerType == HttpHeaderType.Restricted ? (response ? IsResponse : IsRequest) : false; }