HTTP STATUS CODES

HTTP 状态码查询,含义场景一次查清。

按 1xx 到 5xx 分类检索常见 HTTP 状态码,含标准含义、典型场景与排查建议。浏览器本地运行,不上传。

本页处理在浏览器本地完成

这个工具能做什么?

收录 1xx 到 5xx 的常见 HTTP 状态码,每个码给出标准名称、含义说明、典型使用场景与排查建议。可按类别(信息 / 成功 / 重定向 / 客户端错误 / 服务端错误)筛选,也可用关键词搜索码值、英文名或中文含义,例如输入 404、not found 或重定向即可定位。点状态码旁的复制按钮可快速取码值,排查接口问题更高效。全部在浏览器本地完成。

常见问题

301 和 302 有什么区别?

301 是永久重定向,浏览器与搜索引擎会记住并把后续请求直接发到新地址;302 是临时重定向,不缓存目标变化。网址迁移用 301,临时跳转(如登录后回跳)用 302。

401 与 403 如何区分?

401 表示未认证,服务器在提示「你是谁」,通常应返回带认证信息的挑战头;403 表示已识别但被拒绝,是权限不足。接口未登录返回 401,登录了但没权限返回 403。

示例与注意事项Example & notes

一个例子A worked example

排查接口 502:输入 502 直接看到「Bad Gateway——上游服务器返回了无效响应」的含义与常见成因(后端服务挂了、反代配置错、连接超时),以及排查顺序。Debugging a 502: enter 502 and you get what "Bad Gateway — the upstream server returned an invalid response" means, its usual causes (backend down, proxy misconfigured, timeout) and a sensible order to check them.

注意事项Things to watch

相关问答More Q&A

404 和 403 到底差在哪?What is the difference between 404 and 403?

404 是服务器认为这个资源不存在(或不允许暴露其存在),403 是资源确实存在但你没有被授权访问。排查时先确认路径拼写与大小写,再看鉴权配置。404 means the server considers the resource absent (or will not reveal that it exists); 403 means it exists but you are not allowed. Check the path and its case first, then the authorization setup.

为什么同一个接口有时 200 有时 502?Why does the same endpoint sometimes return 200 and sometimes 502?

多半是后端实例不稳定或反代负载均衡把请求转到了已经挂掉的节点。看错误日志里的上游地址能定位到具体节点;偶发 502 通常还需要加上健康检查与自动摘除。Usually an unstable backend or a proxy forwarding to a dead node. The upstream address in the error log identifies the node; intermittent 502s also call for health checks with automatic removal.

深入阅读

觉得好用?Found it useful?