Skip to content

431 Request Header Fields Too Large

Meaning

The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.

When to Use

When the client sends headers that are too large for the server to handle (either one header is too big, or the total size of headers is too big). The server can indicate that the request should be reduced and possibly which header is the issue.

Example

If a client sends a massive cookie header that the server cannot process, the server might respond with 431 Request Header Fields Too Large, possibly implying the client should trim down the header size and retry.

When Not to Use

Do not use if the headers are fine but some other part of the request is too large (body too large would be 413). Also avoid if the error is unrelated to header size (use an appropriate code for the actual error).

Source

RFC 6585


Released under the MIT License.