]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2004-04-17 17:54:27 by cjwatson]
authorcjwatson <>
Sun, 18 Apr 2004 00:54:27 +0000 (16:54 -0800)
committercjwatson <>
Sun, 18 Apr 2004 00:54:27 +0000 (16:54 -0800)
bugs-fetch2 redirects to bugreport.cgi/pkgreport.cgi URLs rather than
obsolete db/ ones.

cgi/bugs-fetch2.pl.in

index bfff3c93510d049b6b251c455fcb7f0832db3d79..2221857f717ae5641d0a7630fdf7942eb352272d 100644 (file)
@@ -26,9 +26,7 @@ There should be no nondigits in your entry.
 END
         exit(0);
     }
-    $suburl= $_;
-    $suburl =~ s,^..,$&/$&,;
-    $suburl.= '.html';
+    $suburl= "bugreport.cgi?bug=$_";
 } elsif ($in{'type'} eq 'package') {
     $_= $in{'package'};
     s/^\s+//; s/\s+$//; y/A-Z/a-z/;
@@ -47,7 +45,7 @@ or digit and contain only letters, digits and the characters
 END
         exit(0);
     }
-    $suburl= "pa/l$_.html";
+    $suburl= "pkgreport.cgi?pkg=$_";
 } else {
     print <<END;
 Content-Type: text/plain
@@ -57,16 +55,13 @@ END
     exit(0);
 }
 
-$base= $ENV{'HTTP_REFERER'};
-if ($base =~ s:/${gWebHostBugDir}/.*$::) {
-    for $y (keys %map) {
-       $base= $map{$y} if $base eq $y;
-    }
-} else {
+if (exists $in{'base'}) {
     $base= $in{'base'};
+} else {
+    $base= $gCGIDomain;
 }
 
-$newurl= "$base/${gWebHostBugDir}/db/$suburl";
+$newurl= "http://$base/$suburl";
 print <<END;
 Status: 301 Redirect
 Location: $newurl