Skip to main content

split_comma_entries

Function split_comma_entries 

Source
pub fn split_comma_entries(raw: &str) -> Vec<&str>
Expand description

Split comma-separated header entries respecting angle-bracket nesting and double-quoted strings.

SIP headers that carry lists (RFC 3261 §7.3.1) use commas as delimiters, but commas may also appear inside angle-bracketed URIs or quoted strings (e.g. Warning warn-text per §20.43). This function splits only on commas at bracket depth zero and outside quoted strings.

Backslash escapes inside quoted strings (RFC 3261 §25.1 quoted-pair) are respected to avoid premature quote-close on \". Quotes are only significant at bracket depth zero: a stray " inside <...> (not legal in any §25.1 URI character set) affects that entry alone.