]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NewsWWW.pm
news_www: avoid uninitialized variables
[public-inbox.git] / lib / PublicInbox / NewsWWW.pm
index d7dd637ff8b681e37f0a483148cd860c08bd477c..abafc4f97b22c037bb138f7e6fe0c8d798c48d2d 100644 (file)
@@ -45,6 +45,8 @@ sub call {
        # some links may have the article number in them:
        # /inbox.foo.bar/123456
        my (undef, @parts) = split(m!/!, $env->{PATH_INFO});
+       @parts or return
+               [ 404, [qw(Content-Type text/plain)], ["404 Not Found\n"] ];
        my ($ng, $article) = @parts;
        my $pi_cfg = $self->{pi_cfg};
        if (my $ibx = $pi_cfg->lookup_newsgroup($ng)) {