From eda0863607e9f60da89d5fa1d22e7d5707a11385 Mon Sep 17 00:00:00 2001 From: Emmett Raymond Date: Mon, 1 Jan 2024 18:03:45 -0600 Subject: [PATCH] feat: allow empty header values for forwards compatibility with STOMP 1.1 and 1.2 style: break terminated call across multiple lines --- src/frame.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frame.rs b/src/frame.rs index a5ea9dd..14c234a 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -136,7 +136,10 @@ fn parse_header(input: &[u8]) -> IResult<&[u8], Header> { complete(separated_pair( is_not(":\r\n"), tag(":"), - terminated(not_line_ending, line_ending).map(Cow::Borrowed), + terminated( + Parser::or(not_line_ending, tag("")), + line_ending + ).map(Cow::Borrowed), )) .parse(input) }