Skip to main content

parse_headers

Function parse_headers 

Source
pub fn parse_headers(block: &[u8]) -> BTreeMap<String, String>
Expand description

Decode a NATS/1.0 header block into name/value pairs.

The version line is skipped and malformed lines are dropped rather than failing the frame: a header a broker invented is not a reason to tear down a session.