mirror of
https://github.com/mjl-/mox.git
synced 2025-07-14 12:14:38 +03:00
implement IMAP extension COMPRESS=DEFLATE, rfc 4978
to compress the entire IMAP connection. tested with thunderbird, meli, k9, ios mail. the initial implementation had interoperability issues with some of these clients: if they write the deflate stream and flush in "partial mode", the go stdlib flate reader does not return any data (until there is an explicit zero-length "sync flush" block, or until the history/sliding window is full), blocking progress, resulting in clients closing the seemingly stuck connection after considering the connection timed out. this includes a coy of the flate package with a new reader that returns partially flushed blocks earlier. this also adds imap trace logging to imapclient.Conn, which was useful for debugging.
This commit is contained in:
11
vendor/github.com/mjl-/flate/README.md
generated
vendored
Normal file
11
vendor/github.com/mjl-/flate/README.md
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
https://pkg.go.dev/compress/flate from go1.24.0, with flate.NewReaderPartial
|
||||
added: a Reader that returns data from blocks flushed with mode "partial
|
||||
flush", without blocking on reading the next flate block. Without
|
||||
NewReaderPartial, protocols that expect a response after writing a short
|
||||
compressed request that was flushed in "partial flush" mode can get stuck.
|
||||
|
||||
Writes/flushes in "partial flush" mode are not implemented.
|
||||
|
||||
https://pkg.go.dev/github.com/mjl-/flate#NewReaderPartial
|
||||
|
||||
Also see https://github.com/golang/go/issues/31514
|
Reference in New Issue
Block a user