Browse Source

imap: don't send CRLF twice when sending LITERAL

This results in BAD IMAP errors, as a CRLF results in an empty command.
Manos Pitsidianakis 5 years ago
parent
commit
2a0ad92374
1 changed files with 0 additions and 3 deletions
  1. 0 3
      melib/src/backends/imap/connection.rs

+ 0 - 3
melib/src/backends/imap/connection.rs

@@ -369,9 +369,6 @@ impl ImapStream {
 
     pub fn send_literal(&mut self, data: &[u8]) -> Result<()> {
         self.stream.write_all(data)?;
-        if !data.ends_with(b"\r\n") {
-            self.stream.write_all(b"\r\n")?;
-        }
         self.stream.write_all(b"\r\n")?;
         Ok(())
     }