Skip to content

Case sensitive header names #114

Open
@archaelus

Description

@archaelus

HTTP Header names are case insensitive, but Hackney returns a proplist of headers and the obvious way to extract a value proplists:get_value is case sensitive.

I would suggest either normalizing the case of the proplist keys before returning them, or return a hackney_headers data structure, which would encourage users to call hackney_headers:get_value(CaseInsensitiveKey, Headers, Default).

Doing this will ensure user code doesn't break if/when an HTTP intermediary changes the case of response headers (ala Amazon ELBs, Heroku's HTTP router, etc).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions