do not require server signature on page error
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 3 Jun 2008 07:32:42 +0000 (07:32 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 3 Jun 2008 07:32:42 +0000 (07:32 +0000)
In rare cases, SERVER_SIGNATURE may not be set.  This isn't a problem,
but we need to check for definedness to prevent warnings.

lib/PLP.pm

index d17c9c631bdd7a01f3a1a2af51307a15065bab0a..2e740cfaa5ab2b156571a0390f92458807c5c06c 100644 (file)
@@ -76,7 +76,9 @@ sub error {
                print "Status: $type\nContent-Type: text/html\n\n",
                        qq{<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html>},
                        "<head>\n<title>$type $short</title>\n</head></body>\n<h1>$short",
-                       "</h1>\n$long<p>\n<hr>\n$ENV{SERVER_SIGNATURE}</body></html>";
+                       "</h1>\n$long<p>\n<hr>\n";
+               print $ENV{SERVER_SIGNATURE} if $ENV{SERVER_SIGNATURE};
+               print "</body></html>";
        }
 }