Skip to content

DOC/MINOR: update request-capture documentation to clarify header handling#780

Open
odoucet wants to merge 1 commit intohaproxytech:masterfrom
odoucet:doc-header-comma-split
Open

DOC/MINOR: update request-capture documentation to clarify header handling#780
odoucet wants to merge 1 commit intohaproxytech:masterfrom
odoucet:doc-header-comma-split

Conversation

@odoucet
Copy link
Contributor

@odoucet odoucet commented Feb 13, 2026

This pull request updates the documentation to clarify and correct how to capture HTTP headers that may contain commas (such as User-Agent) in HAProxy annotations. It emphasizes the importance of using req.fhdr(header-name) instead of hdr(header-name) to avoid issues with truncated or malformed log entries, and updates all relevant examples accordingly.

This is a followup of #729

Documentation improvements:

  • Added a warning in documentation/doc.yaml explaining that hdr(header-name) splits values on commas, which can cause problems when capturing headers like User-Agent, and instructing users to use req.fhdr(header-name) instead.
  • Updated all header capture examples in documentation/doc.yaml to use req.fhdr(user-agent) instead of hdr(User-Agent).
  • Clarified the list of possible values for request capture expressions to include both hdr(header-name) and req.fhdr(header-name) for headers with commas.

@odoucet odoucet force-pushed the doc-header-comma-split branch from bc71ee5 to 1c70a24 Compare February 13, 2026 08:19
@hdurand0710
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments