Skip to main content

parse_sipfrag

Function parse_sipfrag 

Source
pub fn parse_sipfrag(data: &[u8]) -> Result<SipFragment, ParseError>
Expand description

Parse a message/sipfrag body (RFC 3420) — any prefix of a SIP message.

The start line is optional: a fragment that begins with a header is parsed from the headers down. The trailing CRLF is optional too, so a bare status line parses. Fails only when the first line is neither a start line nor a header, or the input is empty.