HTTP状态码

本文详细介绍了HTTP协议中常见的状态码,包括200 OK、301 Moved Permanently、403 Forbidden、404 Not Found、500 Internal Server Error等,解释了每种状态码的具体含义及其应用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

常见的

  • 200 – OK,服务器成功返回网页
    - Standard response for successful HTTP requests.
  • 301 – Moved Permanently(永久跳转),请求的网页已永久跳转到新位置。
    - This and all future requests should be directed to the given.
  • 403 – Forbidden(禁止访问),服务器拒绝请求
    - forbidden request (matches a deny filter) => HTTP 403
    - The request was a legal request, but the server is refusing to respond to it.
  • 404 – Not Found,服务器找不到请求的页面。
    - The requested resource could not be found but may be available again in the future.
  • 500 – Internal Server Error(内部服务器错误)
    - internal error in haproxy => HTTP 500
    - A generic error message, given when no more specific message is suitable.
  • 502 – Bad Gateway(坏的网关),一般是网关服务器请求后端服务时,后端服务没有按照http协议正确返回结果。
    - the server returned an invalid or incomplete response => HTTP 502
    - The server was acting as a gateway or proxy and received an invalid response from the upstream server.
  • 503 – Service Unavailable(服务当前不可用),可能因为超载或停机维护。
    - no server was available to handle the request => HTTP 503
    - The server is currently unavailable (because it is overloaded or down for maintenance).
  • 504 – Gateway Timeout(网关超时),一般是网关服务器请求后端服务时,后端服务没有在特定的时间内完成服务。
    - the server failed to reply in time => HTTP 504
    - The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

其他

  • 100 : Continue
  • 101 : Switching Protocols
  • 102 : Processing
  • 200 : OK
  • 201 : Created
  • 202 : Accepted
  • 203 : Non-Authoritative Information
  • 204 : No Content
  • 205 : Reset Content
  • 206 : Partial Content
  • 207 : Multi-Status
  • 226 : IM Used
  • 300 : Multiple Choices
  • 301 : Moved Permanently
  • 302 : Found
  • 303 : See Other
  • 304 : Not Modified
  • 305 : Use Proxy
  • 306 : Reserved
  • 307 : Temporary Redirect
  • 400 : Bad Request
  • 401 : Unauthorized
  • 402 : Payment Required
  • 403 : Forbidden
  • 404 : Not Found
  • 405 : Method Not Allowed
  • 406 : Not Acceptable
  • 407 : Proxy Authentication Required
  • 408 : Request Timeout
  • 409 : Conflict
  • 410 : Gone
  • 411 : Length Required
  • 412 : Precondition Failed
  • 413 : Request Entity Too Large
  • 414 : Request-URI Too Long
  • 415 : Unsupported Media Type
  • 416 : Requested Range Not Satisfiable
  • 417 : Expectation Failed
  • 422 : Unprocessable Entity
  • 423 : Locked
  • 424 : Failed Dependency
  • 426 : Upgrade Required
  • 500 : Internal Server Error
  • 501 : Not Implemented
  • 502 : Bad Gateway
  • 503 : Service Unavailable
  • 504 : Gateway Timeout
  • 505 : HTTP Version Not Supported
  • 506 : Variant Also Negotiates
  • 507 : Insufficient Storage
  • 510 : Not Extended
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值