Movatterモバイル変換


[0]ホーム

URL:


  1. 給開發者的 Web 技術文件
  2. HTTP
  3. Reference
  4. HTTP 回應狀態碼
  5. 505 HTTP Version Not Supported

此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in EnglishAlways switch to English

505 HTTP Version Not Supported

HTTP505 HTTP Version Not Supported伺服器錯誤回應狀態碼表示伺服器不支援請求中使用的 HTTP 版本。

當請求行格式不正確時,這種錯誤可能會發生。例如請求行為GET /path to resource HTTP/1.1 或以\n 作為結尾而非\r\n。例如,中介設備(如負載平衡器)可能無法正確處理轉發請求中的請求行,如以下範例。

狀態

http
505 HTTP Version Not Supported

範例

由於格式錯誤的請求行而產生 505

在下列範例中,用戶端請求example.com/dog%20trainers,但由於負載平衡器組態不正確,URL 中的百分號編碼未被正確解析。在這種情況下,原始伺服器看到的是trainers 而非 HTTP 版本,因此回傳了一個505 回應。回應主體中包含了一個請求識別碼,這可能有助於伺服器管理員追蹤並診斷問題根源:

http
GET /dog trainers HTTP/1.1Host: example.com
http
HTTP/1.1 505 HTTP Version Not SupportedContent-Type: text/html;Content-Length: 123<!doctype html><html lang="zh"><head>  <title>505 HTTP Version Not Supported</title></head><body>  <h1>505 HTTP Version Not Supported</h1>  <p>如果此問題持續發生,請<a href="https://example.com/support">聯絡支援</a>。</p>  <p>伺服器日誌中包含此錯誤的詳細訊息,請求識別碼:ABC-123。</p></body></html>

規範

Specification
HTTP Semantics
# status.505

參見

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp