From: Frank Lichtenheld Date: Sat, 14 Apr 2007 10:44:51 +0000 (+0200) Subject: Backwards compatibility mode for reportbug X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=aed456717ac398a96918c7af8770c2733f1942d1;p=deb%2Fpackages.git Backwards compatibility mode for reportbug Force exact=1 if UserAgent looks like reportbug. Otherwise it would get confused by the new behaviour to show non-exact matches per default, too. The real solution for this is of course to let it use another format instead of HTML. --- diff --git a/cgi-bin/dispatcher.pl b/cgi-bin/dispatcher.pl index 1f876de..db9d155 100755 --- a/cgi-bin/dispatcher.pl +++ b/cgi-bin/dispatcher.pl @@ -83,6 +83,11 @@ debug( "LANGUAGES=@LANGUAGES header=". bindtextdomain ( 'pdo', $LOCALES ); textdomain( 'pdo' ); +if ($ENV{is_reportbug}) { + $input->param('exact', 1); + debug( "reportbug detected, set paramater exact to '1'" ) if DEBUG; +} + my $what_to_do = 'show'; my $source = 0; if (my $path = $input->path_info() || $input->param('PATH_INFO')) { diff --git a/conf/apache.conf.sed.in b/conf/apache.conf.sed.in index 594efd7..48bdde3 100644 --- a/conf/apache.conf.sed.in +++ b/conf/apache.conf.sed.in @@ -100,6 +100,8 @@ allow from all + BrowserMatch reportbug is_reportbug + RewriteEngine on RewriteLog /var/log/apache2/rewrite.log RewriteLogLevel 0