From 5a437f7d99706191e179f820774182f781946f0f Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 26 Jul 2020 21:59:01 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpHeaderInfo.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Net/HttpHeaderInfo.cs b/websocket-sharp/Net/HttpHeaderInfo.cs index dbaac502..321debb9 100644 --- a/websocket-sharp/Net/HttpHeaderInfo.cs +++ b/websocket-sharp/Net/HttpHeaderInfo.cs @@ -105,9 +105,12 @@ namespace WebSocketSharp.Net public bool IsMultiValue (bool response) { - return (_headerType & HttpHeaderType.MultiValue) == HttpHeaderType.MultiValue - ? (response ? IsResponse : IsRequest) - : (response ? IsMultiValueInResponse : IsMultiValueInRequest); + var headerType = _headerType & HttpHeaderType.MultiValue; + + if (headerType != HttpHeaderType.MultiValue) + return response ? IsMultiValueInResponse : IsMultiValueInRequest; + + return response ? IsResponse : IsRequest; } public bool IsRestricted (bool response)