Skip to content

HttpHeaderBase.Headers requires checking contents with correct case #19

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
andrensairr opened this issue May 29, 2022 · 0 comments
Open

Comments

@andrensairr
Copy link

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.

andrensairr added a commit to andrensairr/SimpleHttpListener.Rx that referenced this issue May 29, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant