oven-sh/bun · error · http::Error
ResponseHeadersTooLarge
ResponseHeadersTooLarge
Error message
ResponseHeadersTooLarge
What it means
The HTTP response headers exceed the maximum allowed size limit. Fires when the cumulative size of status line plus headers surpasses the configured buffer limit, protecting against maliciously large header blocks.
Solutions
- Increase the maximum response header size configuration
- Reduce the number or size of headers sent by the server (remove large cookies, unnecessary headers)
- Check for accidental inclusion of large data in headers
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/http/error.rs:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/ba431cd4a6cee547.
Report an issue: GitHub.
Appendix: source
Thrown at src/http/error.rs:52
#[error("InvalidURL")]
InvalidURL,
#[error("ERR_TLS_CERT_ALTNAME_INVALID")]
ERR_TLS_CERT_ALTNAME_INVALID,
#[error("ClientAborted")]
ClientAborted,
#[error("HTTP2Unsupported")]
HTTP2Unsupported,
#[error("ConnectionClosed")]
ConnectionClosed,
#[error("DNSResolveFailed")]
DNSResolveFailed,
#[error("ConnectionRefused")]
ConnectionRefused,
#[error("TooManyRedirects")]
TooManyRedirects,
#[error("HTTP3Unsupported")]
HTTP3Unsupported,
#[error("ResponseHeadersTooLarge")]
ResponseHeadersTooLarge,
#[error("UnrequestedUpgrade")]
UnrequestedUpgrade,
#[error("UnexpectedData")]
UnexpectedData,
#[error("InvalidHTTPResponse")]
InvalidHTTPResponse,
#[error("InvalidContentLength")]
InvalidContentLength,
#[error("UnsupportedTransferEncoding")]
UnsupportedTransferEncoding,
#[error("RequestBodyNotReusable")]
RequestBodyNotReusable,
#[error("UnsupportedRedirectProtocol")]
UnsupportedRedirectProtocol,
#[error("RedirectURLTooLong")]
RedirectURLTooLong,
#[error("RedirectURLInvalid")]View on GitHub (pinned to 8c5296ac45)