From 2a7f9bb57f486cf152b2d30693b95c231bd22a35 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 12 May 2020 20:46:45 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/WebHeaderCollection.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index dbf8970a..2f031124 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -954,16 +954,14 @@ namespace WebSocketSharp.Net return HttpHeaderType.Unspecified; if (headerInfo.IsRequest) { - if (headerInfo.IsResponse) - return HttpHeaderType.Unspecified; - - return HttpHeaderType.Request; + return !headerInfo.IsResponse + ? HttpHeaderType.Request + : HttpHeaderType.Unspecified; } - if (headerInfo.IsResponse) - return HttpHeaderType.Response; - - return HttpHeaderType.Unspecified; + return headerInfo.IsResponse + ? HttpHeaderType.Response + : HttpHeaderType.Unspecified; } private static bool isMultiValue (string name, bool response)