Hot answers tagged http-code-400
Why 410 gone? Since the page once existed the correct header status return would be 410 gone, this will inform Google and other search engines to drop the page from its index. You should avoid using status 400 bad request since this implies the server did not understand the request due to malformed syntax. Using undesirable status codes will populate your ...
Officially, yes. Any 4xx status may be interpreted as 400; the same goes for the other status groups. (E.g. a 503 service unavailable error may be interpreted as a 500 internal server error.) The RFC is written this way to allow for implementations that may not support every status, and also to allow additional status codes to be defined without breaking ...
My interpretation of that header is that the HTTP specification was not followed properly and a required field is missing or bad data is provided. For example a header is missing or invalid characters are used in the request, etc. Some malformed request exam-ple: GET /images/logo.png HTTP/2 # there is no HTTP 2 POTT /images/logo.png HTTP/1.1 # POTT should ...
Malformed request doesn't mean "a URL you don't have a resource for". It means malformed request. HTTP 400 is definitely wrong here. HTTP 410 works well as it indicates that a previously accessible resource no longer is. Your alternative, as others have mentioned, would be a 404.
Only top voted, non community-wiki answers of a minimum length are eligible