]> git.deb.at Git - deb/packages.git/commitdiff
Packages::Dispatcher: Don't issue bogus 406 errors for index
authorFrank Lichtenheld <frank@lichtenheld.de>
Sat, 9 Feb 2008 17:32:33 +0000 (18:32 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sat, 9 Feb 2008 17:32:33 +0000 (18:32 +0100)
This hack really, really needs to be replaced with something more
robust. Anyway...

lib/Packages/Dispatcher.pm

index 9f844f2e2d175240e4d5eb06887b59a6f08e1c4e..75264a006cf859d93b34d0bab59efc7abcc5687c 100755 (executable)
@@ -315,6 +315,7 @@ sub do_dispatch {
 
     #FIXME: ugly hack
     unless (($what_to_do eq 'allpackages' and $opts{format} =~ /^(html|txt\.gz)/)
+           || ($what_to_do eq 'index' and $opts{format} eq 'html')
            || -e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
        fatal_error( $cat->g("requested format not available for this document"),
                     "406 requested format not available");