You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTP header names are case insensitive, and this library helpfully converts headers to upper case for easy reading. However, I think the actual case of the Headers dictionary keys is an implementation detail that is not easily discovered from the public interface. Dictionary keys must be read or checked for their existence using something like message[key.ToUpper()] or message.Headers.ContainsKey(key.ToUpper()). This is not a problem in itself, but headers like Accept-Encoding and Content-Length are often sent transmitted case, so it is not intuitive to use case sensitive dictionary searching.
The text was updated successfully, but these errors were encountered:
andrensairr
added a commit
to andrensairr/SimpleHttpListener.Rx
that referenced
this issue
May 29, 2022
HTTP header names are case insensitive, and this library helpfully converts headers to upper case for easy reading. However, I think the actual case of the Headers dictionary keys is an implementation detail that is not easily discovered from the public interface. Dictionary keys must be read or checked for their existence using something like
message[key.ToUpper()]
ormessage.Headers.ContainsKey(key.ToUpper())
. This is not a problem in itself, but headers likeAccept-Encoding
andContent-Length
are often sent transmitted case, so it is not intuitive to use case sensitive dictionary searching.The text was updated successfully, but these errors were encountered: