summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/Apache-Test/t/cgi-bin
diff options
context:
space:
mode:
Diffstat (limited to 'debian/perl-framework/Apache-Test/t/cgi-bin')
-rw-r--r--debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL16
-rw-r--r--debian/perl-framework/Apache-Test/t/cgi-bin/next_available_port.pl.PL4
2 files changed, 20 insertions, 0 deletions
diff --git a/debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL b/debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL
new file mode 100644
index 0000000..b409448
--- /dev/null
+++ b/debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL
@@ -0,0 +1,16 @@
+#!perl -wT
+
+use strict;
+
+use CGI;
+use CGI::Cookie;
+
+my %cookies = CGI::Cookie->fetch;
+my $name = 'ApacheTest';
+my $c = ! exists $cookies{$name}
+ ? CGI::Cookie->new(-name=>$name, -value=>time)
+ : '';
+
+print "Set-Cookie: $c\n" if $c;
+print "Content-Type: text/plain\n\n";
+print ($c ? 'new' : 'exists'), "\n";
diff --git a/debian/perl-framework/Apache-Test/t/cgi-bin/next_available_port.pl.PL b/debian/perl-framework/Apache-Test/t/cgi-bin/next_available_port.pl.PL
new file mode 100644
index 0000000..855b45b
--- /dev/null
+++ b/debian/perl-framework/Apache-Test/t/cgi-bin/next_available_port.pl.PL
@@ -0,0 +1,4 @@
+use strict;
+
+print "Content-Type: text/plain\n\n";
+print $ENV{NextAvailablePort} || '';