Skip to content

Commit 16f32c7

Browse files
committed
feat: add quirk for missing space in continue req command
Refs: #638
1 parent f00098a commit 16f32c7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

imap-codec/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ quirk = [
2828
"quirk_rectify_numbers",
2929
"quirk_trailing_space",
3030
"quirk_spaces_between_addresses",
31+
"quirk_spaceless_continue_req_command",
3132
]
3233
# Make `\r` in `\r\n` optional.
3334
quirk_crlf_relaxed = []
@@ -41,6 +42,8 @@ quirk_rectify_numbers = []
4142
quirk_spaces_between_addresses = []
4243
# Accept a trailing space in `STATUS` data response.
4344
quirk_trailing_space = []
45+
# Accept continuation request commands without required space `+\r\n`
46+
quirk_spaceless_continue_req_command = []
4447

4548
# <Forward to imap-types>
4649
arbitrary = ["imap-types/arbitrary"]

imap-codec/src/response.rs

+3
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ pub(crate) fn continue_req(input: &[u8]) -> IMAPResult<&[u8], CommandContinuatio
271271
}
272272

273273
let mut parser = tuple((
274+
#[cfg(feature = "quirk_spaceless_continue_req_command")]
275+
tag(b"+"),
276+
#[cfg(not(feature = "quirk_spaceless_continue_req_command"))]
274277
tag(b"+ "),
275278
alt((
276279
#[cfg(not(feature = "quirk_crlf_relaxed"))]

0 commit comments

Comments
 (0)