X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FIMAP.pm;h=805f1102536d99d9cf77807f86e1b0b3e6290ce4;hp=ce0dce0f317e8fb40a2a0b9da160594cafeb4fcf;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hpb=9b0c238f887475d920a8589b492ec15c63770152 diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm index ce0dce0f..805f1102 100644 --- a/lib/PublicInbox/IMAP.pm +++ b/lib/PublicInbox/IMAP.pm @@ -1212,8 +1212,6 @@ sub event_step { $self->requeue unless $pending; } -sub compressed { undef } - # RFC 4978 sub cmd_compress ($$$) { my ($self, $tag, $alg) = @_; @@ -1223,7 +1221,9 @@ sub cmd_compress ($$$) { # CRIME made TLS compression obsolete # return "$tag NO [COMPRESSIONACTIVE]\r\n" if $self->tls_compressed; - PublicInbox::IMAPdeflate->enable($self, $tag); + PublicInbox::IMAPdeflate->enable($self) or return + \"$tag BAD failed to activate compression\r\n"; + PublicInbox::DS::write($self, \"$tag OK DEFLATE active\r\n"); $self->requeue; undef } @@ -1269,4 +1269,8 @@ our @ISA = qw(PublicInbox::IMAP); sub logged_in { 0 } +package PublicInbox::IMAPdeflate; +use PublicInbox::DSdeflate; +our @ISA = qw(PublicInbox::DSdeflate PublicInbox::IMAP); + 1;