fn take_header_content(b: &[u8]) -> IResult<&[u8], &[u8]> {
    let (rest, (_ws, _token, _more_tokens)) = tuple((
        space0,
        take_token,
        many0(tuple((
            opt(tuple((space0, crlf))), // Per RFC this *should* be opt(crlf), see non-compliant whitespace note
            space1,
            take_token,
        ))),
    ))(b)?;
    let bytes_read = b.len() - rest.len();
    Ok((rest, &b[..bytes_read]))
}
/// The content of an Article Header
///
/// Headers may be split across multiple lines (aka folded)
///
/// [RFC 3977 Appendix 1](https://tools.ietf.org/html/rfc3977#appendix-A.1)
///
/// ```abnf
/// header-content = [WS] token *( [CRLF] WS token )
/// ```
///
/// # Non-Compliant Whitespace
///
/// * All of the header RFCs I've come indicate there is no whitespace allowed between tokens and
/// CLRF characters. Thankfully mail servers don't follow RFCs and violate this anyways so we
/// do allow this *non-compliant* behavior to ease user suffering
The content of an Article Header
Headers may be split across multiple lines (aka folded)




The content of an Article Header Headers may be split across multiple lines ( aka folded )
fn take_header_content(b: &[u8]) -> IResult<&[u8], &[u8]> {
    let (rest, (_ws, _token, _more_tokens)) = tuple((
        space0,
        take_token,
        many0(tuple((
            opt(tuple((space0, crlf))), // Per RFC this *should* be opt(crlf), see non-compliant whitespace note
            space1,
            take_token,
        ))),
    ))(b)?;
    let bytes_read = b.len() - rest.len();
    Ok((rest, &b[..bytes_read]))
}
fn take_header_content ( b : & [ u8 ] ) -> IResult < & [ u8 ] , & [ u8 ] > { let ( rest , ( _ws , _token , _more_tokens ) ) = tuple ( ( space0 , take_token , many0 ( tuple ( ( opt ( tuple ( ( space0 , crlf ) ) ) , // Per RFC this *should* be opt(crlf), see non-compliant whitespace note space1 , take_token , ) ) ) , ) ) ( b ) ? ; let bytes_read = b . len ( ) - rest . len ( ) ; Ok ( ( rest , & b [ .. bytes_read ] ) ) }
The content of an Article Header
Headers may be split across multiple lines (aka folded)
The content of an Article Header Headers may be split across multiple lines ( aka folded )
b
&[u8]
non-compliant whitespace
All of the header RFCs I've come indicate there is no whitespace allowed between tokens and
CLRF characters. Thankfully mail servers don't follow RFCs and violate this anyways so we
do allow this *non-compliant* behavior to ease user suffering
All of the header RFCs I ' ve come indicate there is no whitespace allowed between tokens and CLRF characters . Thankfully mail servers don ' t follow RFCs and violate this anyways so we do allow this * non - compliant * behavior to ease user suffering