diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index efab13e4..52972eaa 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -946,6 +946,22 @@ namespace WebSocketSharp.Net : null; } + private static HttpHeaderType getHeaderType (string name) + { + var headerInfo = getHeaderInfo (name); + + if (headerInfo == null) + return HttpHeaderType.Unspecified; + + if (headerInfo.IsRequest && !headerInfo.IsResponse) + return HttpHeaderType.Request; + + if (!headerInfo.IsRequest && headerInfo.IsResponse) + return HttpHeaderType.Response; + + return HttpHeaderType.Unspecified; + } + private static bool isMultiValue (string name, bool response) { var headerInfo = getHeaderInfo (name);