Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does IIS return code 404.13 instead of code 413 when a request is too large?

IIS has a configurable threshold for filtering out requests that are "too large" and so could potentially DoS the server. Such requests yield code 404.13. Yet HTTP has code 413 Request Entity Too Large that looks like it is exactly for such cases.

Why is code 404 returned instead of code 413?

like image 652
sharptooth Avatar asked Jul 30 '13 10:07

sharptooth


People also ask

How do I fix page was not displayed because the request entity is too large?

Clear your Constant Contact cookies to fix the Request Entity Too Large error. Occasionally when navigating your account, you might see an error message that reads "Request Entity Too Large." When this happens, it means that your Constant Contact cookies have built up and need to be cleared.

What is status code 413?

The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field.


1 Answers

I can't say why IIS decided to avoid an official code for "Request Entity Too Large" and go with their own version. IIS 7 (where 404.13 was introduced, also see here for more status codes) certainly pre-dates RFC 2068 definition of 413. Interestingly, IIS 5 and 6 used the official 413 code. If anything, it would probably have made more sense to subclass 413 under 403 (Forbidden).

This IIS 7 Q&A suggests that you can write your own HttpModule to convert 404.13 response to a 413 response.

Side note: according to RFC 7231, 413 is now called "Payload Too Large"

like image 144
Aurimas Avatar answered Oct 04 '22 10:10

Aurimas