431 Request Header Fields Too Large

The request headers are collectively or individually too large for the server to process.

Status

HTTP/1.1 431 Request Header Fields Too Large

Details

431 covers both cases: the whole header block exceeded the server's buffer, or one field did. Cookies are the usual offender, since they accumulate silently until a single domain sends several kilobytes on every request.

The response should say which field was the problem when it can, because a client with no idea which header is oversized has little to work with.

Common causes

How to fix it

As the client

As the server

Examples

GET / HTTP/1.1
Host: www.example.com
Cookie: (12KB of accumulated cookies)

HTTP/1.1 431 Request Header Fields Too Large
Content-Type: text/plain

Cookie header exceeds 8192 bytes

Specifications

RFC 6585 §5

See also