diff --git a/websocket-sharp/Net/HttpHeaderInfo.cs b/websocket-sharp/Net/HttpHeaderInfo.cs index 9c19988f..84274353 100644 --- a/websocket-sharp/Net/HttpHeaderInfo.cs +++ b/websocket-sharp/Net/HttpHeaderInfo.cs @@ -69,21 +69,21 @@ namespace WebSocketSharp.Net #region Public Properties - public bool IsRequest { + public string HeaderName { get { - return (_headerType & HttpHeaderType.Request) == HttpHeaderType.Request; + return _headerName; } } - public bool IsResponse { + public bool IsRequest { get { - return (_headerType & HttpHeaderType.Response) == HttpHeaderType.Response; + return (_headerType & HttpHeaderType.Request) == HttpHeaderType.Request; } } - public string Name { + public bool IsResponse { get { - return _headerName; + return (_headerType & HttpHeaderType.Response) == HttpHeaderType.Response; } } diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index d031349c..f92fc291 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -868,7 +868,7 @@ namespace WebSocketSharp.Net var comparison = StringComparison.InvariantCultureIgnoreCase; foreach (var headerInfo in _headers.Values) { - if (headerInfo.Name.Equals (name, comparison)) + if (headerInfo.HeaderName.Equals (name, comparison)) return headerInfo; } @@ -880,7 +880,7 @@ namespace WebSocketSharp.Net HttpHeaderInfo headerInfo; return _headers.TryGetValue (key, out headerInfo) - ? headerInfo.Name + ? headerInfo.HeaderName : null; }