]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NNTP.pm
make zlib-related modules a hard dependency
[public-inbox.git] / lib / PublicInbox / NNTP.pm
index c79f198beb186f00c441d31e1ca122cad77a58eb..e9c66cd1c7038251ff8081925ad452441333b8a6 100644 (file)
@@ -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;