Skip to content

Response isJson() method does not work for lowercased headers #533

@Riley19280

Description

@Riley19280

I am working with the FastAPI python server, that serves the headers in lowercase according the the HTTP RFC, mentioned here.

According to RFC for HTTP1.x in any case headers key must be case insensitive and a common implementation for performance reason is to lowercase it.
According to RFC for HTTP2.x headers key must be case insensitive and must be lowercase, so it gives more sense for an implementation to workwith lowercase. In HTTP 2.x not lowercase key should be dropped or refused.

the isJson method expects it to be cased as Content-Type, not content-type, and will incorrectly return false if a lowercase

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions