Skip to content

When checking the Accept header the charset is expected to be utf8 not utf-8 #120

Closed
@pkqk

Description

@pkqk

Expected Behaviour
A request with the HTTP header:

Accept: application/json; charset=utf-8

is accepted as a GraphQL request

Actual Behaviour
The request is rejected with:

HTTP 406 Not Acceptable

Debug Information
I think the check here is wrong and should be looking for utf-8 not utf8.
https://github.com/graphql/graphql-http/blob/v1.22.0/src/handler.ts#L593

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleasedHas been released and published

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions