Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.63 KB

2019-02-26-413-payload-too-large.md

File metadata and controls

59 lines (45 loc) · 1.63 KB
date title permalink tags location geo
2019-02-26 11:00:00 -0400
413 Payload Too Large
/http/413-payload-too-large
http
http-series
DiiD office, Adelaide St W, Toronto, ON, Canada
43.647767
-79.389963

The 413 Payload Too Large response is used when the client sent a request with a body that's too big.

Maybe the request was a file upload, and it exceeded the maximum file-size, or maybe it's an API and it preemptively blocks requests that are unrealisticly large.

It's a good idea to try and think of reasonable limits for requests, as accepting arbitrary-size HTTP requests could result in denial-of-service attacks.

If this error is temporary, a server can include a Retry-After header to indicate to the client they should just try again after a certain amount of time.

One example of a temporary status could be that the client has an upload-quota and it was exceeded.

If the reason for the error is that the server ran out of disk- space, 507 Insufficient Storage should be used instead.

Example

HTTP/1.1 413 Payload Too Large
Content-Type: text/html

<p>This endpoint does not support requests larger than 1MB</p>
HTTP/1.1 413 Payload Too Large
Retry-After: 3600
Content-Type: text/html

<p>You exceeded your quota. Try again in an hour</p>

References