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 năm trước cách đây
mục cha
commit
2a0ad92374
1 tập tin đã thay đổi với 0 bổ sung3 xóa
  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(())
     }