分類
碼錶
RFC2616規範上的HTTP狀態碼就達40種,若再加上擴展,數量就達60餘種,經常使用的大概只有14種:
200、204、206
301、302、303、304、307
400、401、403、404
500、503
類型 | 狀態碼 | 描述 |
---|---|---|
1xx消息 | 100 | Continue |
101 | Switching Protocols | |
102 | Processing | |
2xx成功 | 200 | OK 成功 |
201 | Created | |
202 | Accepted | |
203 | Non Authoritative information | |
204 |
No Content 請求已成功處理,但在返回的響應報文中不含實體的主體部分 |
|
205 | Reset Content | |
206 |
Partial Content 客戶端進行了範圍Content-Range請求,而服務器成功執行了這部分的GET請求。 響應報文中包含由Content-Range指定範圍的實體內容。 |
|
207 | Multi-Status | |
208 | Already Reported | |
226 | IM Used | |
3xx重定向 | 300 | Multiple Choices |
301 |
Moved Permanently 永久性重定向。 該狀態碼錶示請求的資源已被分配了新的URI(Location首部字段),以後應使用資源現在所指的URI |
|
302 |
Found 臨時性重定向 請求的資源已被分配了新的URI,希望用戶(本次)能使用新的URI訪問。 |
|
303 |
See Other 與302類似,區別在於客戶端應當採用GET方法獲取資源 |
|
304 |
Not Modified 請求帶條件,if-not-modified等 服務器端資源未改變,可直接使用客戶端未過期的緩存 |
|
305 | Use Proxy | |
306 | Switch Proxy | |
307 |
Temporary Redirect 臨時重定向。該狀態碼與302 Found有着相同的含義 |
|
308 | Permanent Redirect | |
4xx請求錯誤 | 400 |
Bad Request 請求報文中存在語法錯誤 |
401 |
Unauthorized 需要有通過HTTP認證(BASIC認證、DIGEST認證)的認證 |
|
402 | Payment Required | |
403 |
Forbidden 訪問權限出現某些問題(從未授權的發送源IP地址試圖訪問) |
|
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 | |
418 | I'm a teapot. | |
419 | Authentication Timeout | |
420 | Enhance Your Caim | |
421 | Misdirected Request | |
422 | Unprocessable Entity | |
423 | Locked | |
424 | Failed Dependency | |
425 | Too Early | |
426 | Upgrade Required | |
428 | Precondition Required | |
429 | Too Many Requests | |
431 | Request Header Fields Too Large | |
444 | No Response | |
450 | Blocked by Windows Parental Controls | |
451 | Unavailable For Legal Reasons | |
494 | Request Header Too Large | |
499 | 客戶端等待超時主動斷開連接,nginx返回 | |
5xx服務器錯誤 | 500 |
Internal Server Error 服務器端在執行請求時發生了錯誤,Web應用存在的bug或某些臨時的故障,服務端拋異常沒有兜住封裝錯誤碼 |
501 | Not Implemented | |
502 |
Bad Gateway 上游服務不可用 |
|
503 | Service Unavailable 超負載或正在進行停機維護,現在無法處理請求 |
|
504 | Gateway Timeout | |
505 | Http Version Not Supported | |
506 | Variant Also Negotiates | |
507 | Insufficient Storage | |
508 | Loop Detected | |
509 | Bandwidth Limit Exceeded | |
510 | Not Extended | |
511 | Network Authentication Required |