about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTP.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r--lib/PublicInbox/NNTP.pm11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index c79f198b..e9c66cd1 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -38,8 +38,7 @@ NEWNEWS\r
 LIST ACTIVE ACTIVE.TIMES NEWSGROUPS OVERVIEW.FMT\r
 HDR\r
 OVER\r
-
-my $have_deflate;
+COMPRESS DEFLATE\r
 
 sub greet ($) { $_[0]->write($_[0]->{nntpd}->{greet}) };
 
@@ -903,7 +902,7 @@ sub cmd_starttls ($) {
 sub cmd_compress ($$) {
         my ($self, $alg) = @_;
         return '503 Only DEFLATE is supported' if uc($alg) ne 'DEFLATE';
-        return r502 if $self->compressed || !$have_deflate;
+        return r502 if $self->compressed;
         PublicInbox::NNTPdeflate->enable($self);
         $self->requeue;
         undef
@@ -990,10 +989,4 @@ sub busy {
         ($self->{rbuf} || $self->{wbuf} || $self->not_idle_long($now));
 }
 
-# this is an import to prevent "perl -c" from complaining about fields
-sub import {
-        $have_deflate = eval { require PublicInbox::NNTPdeflate } and
-                $CAPABILITIES .= "COMPRESS DEFLATE\r\n";
-}
-
 1;