Bad Request responded with 404.xx
I've found two strange behaviours of IIS.
<httpErrors existingResponse="PassThrough" />
<requestLimits maxAllowedContentLength="5000000" />
<add verb="HEAD" allowed="false" />
In this code snippet,
Rejects the request if content size is bigger than 5 MBs. It responds with a 404. (404.13)
Rejects the HTTP HEAD requests. It also responds with 404.
Since HTTP Status Codes are independent of the running platform, we expected a common message, not the IIS specific status code.
For request limits, It should respond with 400 - Bad Request.
For ignored HTTP Method, It should respond with 405 - Method Not Allowed.
This default behaviour affects our SEO, security reports and proper communication with other services.
Standart HTTP Status Codes: https://en.wikipedia.org/wiki/ListofHTTPstatuscodes