[Modify] Polish it

This commit is contained in:
sta 2020-07-26 21:59:01 +09:00
parent 63a5e9c11b
commit 5a437f7d99

View File

@ -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)