From aed456717ac398a96918c7af8770c2733f1942d1 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 14 Apr 2007 12:44:51 +0200 Subject: [PATCH] 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. --- cgi-bin/dispatcher.pl | 5 +++++ conf/apache.conf.sed.in | 2 ++ 2 files changed, 7 insertions(+) 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 -- 2.39.2