]> Sergey Matveev's repositories - public-inbox.git/commitdiff
nntp: consistently use 501 for unsupported LIST
authorEric Wong <e@80x24.org>
Fri, 25 Sep 2015 02:27:51 +0000 (02:27 +0000)
committerEric Wong <e@80x24.org>
Fri, 25 Sep 2015 02:29:05 +0000 (02:29 +0000)
This is required by RFC 3977, section 3.2.1

lib/PublicInbox/NNTP.pm

index c2f97177ecb8e4c1e925d32c949d079d31ae3906..dd033e89e75bec54ee2a1e40c8e6b1ca4784a0ea 100644 (file)
@@ -123,14 +123,14 @@ sub list_newsgroups ($;$) {
        }
 }
 
-# LIST SUBSCRIPTIONS not supported
+# LIST SUBSCRIPTIONS, DISTRIB.PATS are not supported
 sub cmd_list ($;$$) {
        my ($self, @args) = @_;
        if (scalar @args) {
                my $arg = shift @args;
                $arg =~ tr/A-Z./a-z_/;
                $arg = "list_$arg";
-               return '503 function not performed' if $DISABLED{$arg};
+               return r501 if $DISABLED{$arg};
 
                $arg = eval {
                        no strict 'refs';