# 错误：http：响应头过大

- **ID:** `go/http-response-header-too-large`
- **领域:** go
- **类别:** network_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

响应头超过了客户端的限制，通常由 http.Transport 的 MaxResponseHeaderBytes 设置。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.18 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Set http.Transport.MaxResponseHeaderBytes to a higher value.
   ```
2. **** (85% 成功率)
   ```
   Use a custom http.Client with a larger MaxResponseHeaderBytes.
   ```

## 无效尝试

- **** — The buffer size is not the limiting factor; the header size limit is separate. (75% 失败率)
- **** — Header compression is not related to the size limit. (80% 失败率)
