use vars qw($gPackagePages $gWebDomain);
-if ($ENV{REQUEST_METHOD} eq 'HEAD') {
- print "Content-Type: text/html\n\n";
+if (defined $ENV{REQUEST_METHOD} and $ENV{REQUEST_METHOD} eq 'HEAD') {
+ print "Content-Type: text/html; charset=utf-8\n\n";
exit 0;
}
my $result = htmlizebugs(\@bugs);
-print "Content-Type: text/html\n\n";
+print "Content-Type: text/html; charset=utf-8\n\n";
print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
print "<HTML><HEAD>\n" .
if ($pkg and defined($pseudodesc) and exists($pseudodesc->{$pkg})) {
push @references, "to the <a href=\"http://${debbugs::gWebDomain}/pseudo-packages${debbugs::gHTMLSuffix}\">list of other pseudo-packages</a>";
} else {
- if ($pkg) {
+ if ($pkg and defined $debbugs::gPackagePages) {
push @references, sprintf "to the <a href=\"%s\">%s package page</a>", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg");
}
if (defined $debbugs::gSubscriptionDomain) {