From 9488a8906592564ec2e7601041f3ea5484cde3cc Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Mon, 5 May 2003 08:15:19 +0000 Subject: Bug 201816 - use CGI.pm for header output r=joel, a=justdave --- duplicates.cgi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'duplicates.cgi') diff --git a/duplicates.cgi b/duplicates.cgi index dc65ef502..27333cbab 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -36,15 +36,18 @@ use vars qw($buffer); use Bugzilla; use Bugzilla::Search; -use Bugzilla::CGI; + +my $cgi = Bugzilla->cgi; # Go directly to the XUL version of the duplicates report (duplicates.xul) # if the user specified ctype=xul. Adds params if they exist, and directs # the user to a signed copy of the script in duplicates.jar if it exists. if ($::FORM{'ctype'} && $::FORM{'ctype'} eq "xul") { my $params = CanonicaliseParams($::buffer, ["format", "ctype"]); - print "Location: " . (-e "duplicates.jar" ? "duplicates.jar!/" : "") . + my $url = (-e "duplicates.jar" ? "duplicates.jar!/" : "") . "duplicates.xul" . ($params ? "?$params" : "") . "\n\n"; + + print $cgi->redirect($url); exit; } @@ -261,8 +264,8 @@ $vars->{'products'} = \@::legal_product; my $format = GetFormat("reports/duplicates", $::FORM{'format'}, $::FORM{'ctype'}); - -print "Content-Type: $format->{'ctype'}\n\n"; + +print $cgi->header($format->{'ctype'}); # Generate and return the UI (HTML page) from the appropriate template. $template->process($format->{'template'}, $vars) -- cgit v1.2.3-24-g4f1b