1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Status Codes

  1. 413 Payload Too Large
    1. Writing responses (servers)
      1. Method doesn't permit a message body
      2. Message body exceeds resource limits
      3. See also: Server is out of storage space
    2. Reading responses (clients)
    3. Overview table
    4. Example

413 Payload Too Large

The 413 Payload Too Large HTTP status code indicates an unexpected or over-long request message body.

Writing responses (servers)

Servers should produce 413 Payload Too Large in these cases:

Method doesn't permit a message body

If the method is not one that allows a request body (such as TRACE), then send 413 Payload Too Large along with a message explaining that no message body is allowed in the request.

Message body exceeds resource limits

If the resource has limits on what it is able to accept, or the server has per-user limits on what they may upload, and the upload size exceeds these limits, then send 413 Payload Too Large along with a document describing the maximum permitted size.

If the client did not send a Content-Length and the upload becomes too large to accept, close the connection after writing the response.

See also: Server is out of storage space

If the server would normally be able to accept an upload, but cannot at the moment because it must be written to a location that has insufficient free space, see 507 Insufficient Storage instead.

Reading responses (clients)

This error typically requires user intervention; the user must figure out how to reduce the upload size.

If the server has a mechanism for breaking the upload into smaller parts, clients may implement this process and try that.

If the error is due to calling a method that does not accept a request message body, the client must be reworked to not make that request with a message body.

Overview table

Name
413
Message
413 Payload Too Large
Description
The request body is too large.
Specification
RFC 7231: HTTP/1.1 Semantics and Content ยง6.5.11. 413 Payload Too Large

Example

HTTP/1.1 413 Payload Too Large