{
  "id": "nginx/upstream-sent-invalid-http-version",
  "signature": "upstream sent invalid HTTP version while reading response header from upstream",
  "signature_zh": "上游发送了无效的 HTTP 版本",
  "regex": "upstream sent invalid HTTP version while reading response header from upstream",
  "domain": "nginx",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "The upstream server returns a response with an unrecognized or malformed HTTP version string (e.g., HTTP/1.0, HTTP/2.0, or HTTP/3).",
  "root_cause_type": "generic",
  "root_cause_zh": "上游服务器返回的响应中包含无法识别或格式错误的 HTTP 版本字符串（例如 HTTP/1.0、HTTP/2.0 或 HTTP/3）。",
  "versions": [
    {
      "version": "nginx-1.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-1.25.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-1.26.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Forcing HTTP/1.0 on a modern upstream that uses chunked encoding or keepalive will cause protocol mismatch.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is about the response version, not the request path.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This error is a protocol-level error, not a buffer size issue.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set proxy_http_version to 1.1 or 2.0 in the location block to match the upstream server's expected protocol. Example:\nlocation /api/ {\n    proxy_pass http://backend;\n    proxy_http_version 1.1;\n    proxy_set_header Connection \"\";\n}",
      "success_rate": 0.9,
      "how": "Set proxy_http_version to 1.1 or 2.0 in the location block to match the upstream server's expected protocol. Example:\nlocation /api/ {\n    proxy_pass http://backend;\n    proxy_http_version 1.1;\n    proxy_set_header Connection \"\";\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the upstream is a custom or legacy server, ensure it returns a valid HTTP version string (e.g., 'HTTP/1.1 200 OK'). Check the upstream application logs for version misconfiguration.",
      "success_rate": 0.85,
      "how": "If the upstream is a custom or legacy server, ensure it returns a valid HTTP version string (e.g., 'HTTP/1.1 200 OK'). Check the upstream application logs for version misconfiguration.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Set proxy_http_version to 1.1 or 2.0 in the location block to match the upstream server's expected protocol. Example:\nlocation /api/ {\n    proxy_pass http://backend;\n    proxy_http_version 1.1;\n    proxy_set_header Connection \"\";\n}",
    "If the upstream is a custom or legacy server, ensure it returns a valid HTTP version string (e.g., 'HTTP/1.1 200 OK'). Check the upstream application logs for version misconfiguration."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}