HTTP status codes are one of the core communication mechanisms of the web, yet in practice they are often treated as secondary details. Many applications rely on response bodies to signal errors or success, while status codes are used inconsistently or even contradict the actual result of request processing.
In this article, I take a closer look at HTTP status codes as protocol-level signals and explain why their semantic correctness matters for web and API testing. The discussion covers the main status code classes, common inconsistencies between status codes and response bodies, and how these issues affect client behavior.
The article also includes a real-world case study discovered during server analysis, where a redirect response appeared safe in the browser but still exposed private data to non-browser clients. This example highlights why browser behavior cannot be trusted as the only validation method and why protocol-level inspection is essential when testing web systems and APIs.