3 ms·
I've never used IIS, but isn't that confusing protocol codes with content codes? IMO HTTP status codes should return information about the HTTP transaction, an
by TheOtherHobbes 11y ago
I've never used IIS, but isn't that confusing protocol codes with content codes?
IMO HTTP status codes should return information about the HTTP transaction, and only about the HTTP transaction.
If you run an API layer on top of that, that's a separate concern.
So "Server busy" should not be in the same space as "That API request was bad."
On my last project I returned 200 for successful transactions, 404 for missing pages, and 444/closed connection for 'Piss off and stop making inept attempts to hack this server, use it as a free proxy, or rack up your SEO stats."
IPs trying any of the latter are blocked by Fail2Ban.
444 seems to have cut down on spam requests from botnets, and it's cheaper than serving a full 404 page.