Skip to content

Handle invalid locale in the Accept-Language request header #4

@robotdan

Description

@robotdan

Description

If you send an invalid locale value such as en_AE instead of en-AE in the Accept-Language header, we should ensure we handle this correctly.

MDN suggests returning a 406, or to just ignore the value.

The server possibly can send back a 406 (Not Acceptable) error code when unable to serve content in a matching language. However, such a behavior is rarely implemented for a better user experience, and servers often ignore the Accept-Language header in such cases.

Related

Additional details

Metadata

Metadata

Assignees

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