How to react to a malformed Accept-Language header?

66 Views Asked by At

How should a server react to a malformed Accept-Language header that doesn't conform to RFC 9110? Should it return a 400 Bad Request or should it ignore the header?

I would tend to return a 400 error, but since it is just a preference, maybe it should be handled more gracefully. Does it make a difference if the request is for a web page from a browser or to an Open API endpoint? I couldn't find any information.

0

There are 0 best solutions below