200-901 · Question #635
When does a server return an HTTP 400 response code to the client?
The correct answer is A. when the server could not understand the request due to invalid syntax. HTTP 400 (Bad Request) is returned by a server when it cannot process the request because the client sent malformed or invalid syntax - for example, a malformed URL, invalid request framing, or corrupt request data. The error originates on the client side. Choice B describes…
Question
When does a server return an HTTP 400 response code to the client?
Options
- Awhen the server could not understand the request due to invalid syntax
- Bwhen the server cannot find the requested resource
- Cwhen the client requests a resource that is unavailable
- Dwhen the client must authenticate itself to access the resource
How the community answered
(32 responses)- A91% (29)
- C6% (2)
- D3% (1)
Explanation
HTTP 400 (Bad Request) is returned by a server when it cannot process the request because the client sent malformed or invalid syntax - for example, a malformed URL, invalid request framing, or corrupt request data. The error originates on the client side. Choice B describes HTTP 404 (Not Found). Choice C also describes a resource availability issue, which maps to HTTP 503 (Service Unavailable) or 404. Choice D describes HTTP 401 (Unauthorized), where authentication is required before accessing a resource.
Topics
Community Discussion
No community discussion yet for this question.