diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2016-07-02 13:38:37 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2016-07-02 13:47:22 -0400 |
commit | d147673d401996fcfb7e41c9419d319f93ac398d (patch) | |
tree | 683d5faa6139b98372ea1f725ff7f20b233750f1 | |
parent | c489dd6cc43df0f72126fb71b4f563ca44a46cca (diff) | |
download | lighttpd-git-d147673d401996fcfb7e41c9419d319f93ac398d.tar.gz |
[tests] remove dependency on CGI.pm
CGI.pm is no longer shipped as part of Perl core distribution
(and is easily replaced)
-rwxr-xr-x | tests/docroot/www/404.fcgi | 2 | ||||
-rwxr-xr-x | tests/docroot/www/404.pl | 45 | ||||
-rwxr-xr-x | tests/docroot/www/send404.pl | 9 |
3 files changed, 28 insertions, 28 deletions
diff --git a/tests/docroot/www/404.fcgi b/tests/docroot/www/404.fcgi index f98c3f6c..b6459bc3 100755 --- a/tests/docroot/www/404.fcgi +++ b/tests/docroot/www/404.fcgi @@ -1,9 +1,7 @@ #!/usr/bin/env perl -#use CGI qw/:standard/; use CGI::Fast qw(:standard); -my $cgi = new CGI; while (new CGI::Fast) { my $request_uri = $ENV{'REQUEST_URI'}; print (STDERR "REQUEST_URI: $request_uri\n"); diff --git a/tests/docroot/www/404.pl b/tests/docroot/www/404.pl index 0c0668a3..d4eb2aee 100755 --- a/tests/docroot/www/404.pl +++ b/tests/docroot/www/404.pl @@ -1,42 +1,43 @@ #!/usr/bin/env perl -use CGI qw/:standard/; - -my $cgi = new CGI; my $request_uri = $ENV{'REQUEST_URI'}; # server.error-handler-404 my $redirect_uri= $ENV{'REDIRECT_URI'}; # server.error-handler -print (STDERR "REQUEST_URI: $request_uri\n"); -print (STDERR "REDIRECT_URI: $redirect_uri\n"); if ($request_uri =~ m/^\/dynamic\/200\// ) { - print header ( -status => 200, - -type => 'text/plain' ); - print ("found here\n"); + print "Status: 200\n", + "Content-Type: text/plain\n", + "\n", + "found here\n"; } elsif ($request_uri =~ m|^/dynamic/302/| ) { - print header( -status=>302, - -location => 'http://www.example.org/'); + print "Status: 302\n", + "Location: http://www.example.org/\n", + "\n"; } elsif ($request_uri =~ m/^\/dynamic\/404\// ) { - print header ( -status => 404 - -type => 'text/plain' ); - print ("Not found here\n"); + print "Status: 404\n", + "Content-Type: text/plain\n", + "\n", + "Not found here\n"; } elsif ($request_uri =~ m/^\/send404\.pl/ ) { - print header ( -status => 404 - -type => 'text/plain' ); - print ("Not found here (send404)\n"); + print "Status: 404\n", + "Content-Type: text/plain\n", + "\n", + "Not found here (send404)\n"; } elsif ($request_uri =~ m/^\/dynamic\/nostatus\// ) { print ("found here\n"); } elsif ($redirect_uri =~ m/^\/dynamic\/redirect_status\// ) { - print header ( -status => $ENV{'REDIRECT_STATUS'}, - -type => 'text/plain'); - print ("REDIRECT_STATUS\n"); + print "Status: $ENV{'REDIRECT_STATUS'}\n", + "Content-Type: text/plain\n", + "\n", + "REDIRECT_STATUS\n"; } else { - print header ( -status => 500, - -type => 'text/plain'); - print ("huh\n"); + print "Status: 500\n", + "Content-Type: text/plain\n", + "\n", + "huh\n"; }; diff --git a/tests/docroot/www/send404.pl b/tests/docroot/www/send404.pl index 7a8ab0e7..45c619a7 100755 --- a/tests/docroot/www/send404.pl +++ b/tests/docroot/www/send404.pl @@ -1,5 +1,6 @@ #!/usr/bin/env perl -use CGI qw/:standard/; -print header ( -status => 404 - -type => 'text/plain' ); -print ("send404\n"); + +print "Status: 404\n", + "Content-Type: text/plain\n", + "\n", + "send404\n"; |