cgierror: When the CGI fails, print the error to stderr, not "Died"
$@ could be clobbered by the "exception handler", and in practice it seems that it is. This can be seen on stderr of t/git-cgi.t.master
parent
26ded17653
commit
60cb2ac458
|
@ -490,7 +490,8 @@ sub cgierror ($) {
|
|||
print "Content-type: text/html\n\n";
|
||||
print cgitemplate(undef, gettext("Error"),
|
||||
"<p class=\"error\">".gettext("Error").": $message</p>");
|
||||
die $@;
|
||||
|
||||
die $message;
|
||||
}
|
||||
|
||||
1
|
||||
|
|
|
@ -6,6 +6,7 @@ ikiwiki (3.20170112) UNRELEASED; urgency=medium
|
|||
* Guard against set-but-empty REMOTE_USER CGI variable on
|
||||
misconfigured nginx servers, and in general treat sessions with
|
||||
a set-but-empty name as if they were not signed in.
|
||||
* When the CGI fails, print the error to stderr, not "Died"
|
||||
|
||||
-- Simon McVittie <smcv@debian.org> Sun, 14 May 2017 15:34:52 +0100
|
||||
|
||||
|
|
Loading…
Reference in New Issue