[edge] Fetch: accept up to 1000 informational heads (Go has no count limit); KD-10 beyond

This commit is contained in:
2026-11-07 16:41:41 +01:00
parent 8c04b0f4bd
commit 27b0a165b2
3 changed files with 37 additions and 3 deletions
+4 -2
View File
@@ -28,8 +28,10 @@ pub struct Fetched {
/// Dial timeout, matching Caddy's reverse_proxy default.
pub const DIAL_TIMEOUT: Duration = Duration::from_secs(3);
/// More 1xx heads than this before a final answer is treated as a broken server.
const MAX_INFORMATIONAL: usize = 8;
/// More 1xx heads than this before a final answer is treated as a broken server. Go (and so
/// Caddy) has no count limit, only one on total header bytes; 1000 heads accepts anything a
/// real server sends, and the overall deadline bounds the rest.
const MAX_INFORMATIONAL: usize = 1000;
pub fn peer(addr: SocketAddr, u: &UpstreamRt) -> HttpPeer {
let mut p = HttpPeer::new(addr, u.tls, u.sni.clone());