Skip to content

Are empty header values equivalent to absent ones? #15

@robhanlon22

Description

@robhanlon22

There are a lot of falsey checks in this library rather than undefined checks. Here's one, for example. I'm wondering if these should be switched to null/undefined checks (x == null) as it appears that empty header values are valid according to the HTTP RFC. I'm wondering this is that I'm working with an API that is behaving weirdly (returns Pragma: no-cache alongside Cache-Control: ) when I send over a Cache-Control: max-age=3600 header in the request, which is causing this library to consider the response to not be cacheable. Thx!

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