Skip to content

HttpHeaderBase.Headers requires checking contents with correct case #19

@andrensairr

Description

@andrensairr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions