diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-03-09 17:18:44 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-03-09 19:51:42 -0500 |
commit | bd67d9f4acfbb4f8bd373006f77102126df8eeba (patch) | |
tree | 51e3a14398cba32a867c4626a8f04ec852dbe00c /tests/docroot | |
parent | e447de1b66bde910a013f26dad52777f877feed7 (diff) | |
download | lighttpd-git-bd67d9f4acfbb4f8bd373006f77102126df8eeba.tar.gz |
[core] permit env w/ blank value (fix regression)
(thx Lars Bingchong)
empty env var must be set to blank string and not left unset
(regression in lighttpd 1.4.56 - lighttpd 1.4.64)
x-ref:
https://stackoverflow.com/a/52913064/1338888
Diffstat (limited to 'tests/docroot')
-rwxr-xr-x | tests/docroot/cgi.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/docroot/cgi.pl b/tests/docroot/cgi.pl index 97e00d31..cb72f45a 100755 --- a/tests/docroot/cgi.pl +++ b/tests/docroot/cgi.pl @@ -2,7 +2,8 @@ # env if ($ENV{"QUERY_STRING"} =~ /^env=(\w+)/) { - print "Status: 200\r\n\r\n$ENV{$1}"; + my $v = defined($ENV{$1}) ? $ENV{$1} : "[$1 not found]"; + print "Status: 200\r\n\r\n$v"; exit 0; } |