You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
http: count malformed client Forwarded lines removed by Sōzu #1692
Follow-up to #1685 (forwarded_headers per listener), found in its review.
#1685 validates a client-supplied Forwarded value against the RFC 7239 §4 grammar and removes a malformed line in the both (default) and rfc7239 modes, so Sōzu's own element always stays parseable. Values that break the RFC but are common in practice — an unquoted port (for=1.2.3.4:80) or an unquoted IPv6 address (for=2001:db8::1) — are therefore now dropped instead of extended. That is RFC-correct and documented, but the only trace is a debug! log: an operator behind a non-conforming upstream load balancer loses the upstream chain without any visible signal.
Proposal:
add a counter, e.g. http.forwarded_malformed_elided, incremented once per removed line, documented in doc/observability.md;
fix the comment above the trailer drop list in lib/src/protocol/mux/pkawa.rs, which says each X-Forwarded-* header is "either synthesised or removed" on the HEADERS pass — untrue in none mode, and in x_forwarded mode for Forwarded.
Test: an editor test asserting the counter increments for a malformed line and not for a valid one.
Activity
feat(http): count malformed client Forwarded lines removed by Sōzu (s…