OLD | NEW |
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 # Copyright 2011 The Go Authors. All rights reserved. | 2 # Copyright 2011 The Go Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style | 3 # Use of this source code is governed by a BSD-style |
4 # license that can be found in the LICENSE file. | 4 # license that can be found in the LICENSE file. |
5 # | 5 # |
6 # Test script run as a child process under cgi_test.go | 6 # Test script run as a child process under cgi_test.go |
7 | 7 |
8 use strict; | 8 use strict; |
9 use CGI; | 9 use CGI; |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 $p->("X-Test-Header: X-Test-Value"); | 23 $p->("X-Test-Header: X-Test-Value"); |
24 $p->(""); | 24 $p->(""); |
25 | 25 |
26 print "test=Hello CGI\n"; | 26 print "test=Hello CGI\n"; |
27 | 27 |
28 foreach my $k (sort keys %$params) { | 28 foreach my $k (sort keys %$params) { |
29 print "param-$k=$params->{$k}\n"; | 29 print "param-$k=$params->{$k}\n"; |
30 } | 30 } |
31 | 31 |
32 foreach my $k (sort keys %ENV) { | 32 foreach my $k (sort keys %ENV) { |
33 print "env-$k=$ENV{$k}\n"; | 33 print "env-$k=".do { (my $new_env = $ENV{$k}) =~ s/[\n\r]//g; $new_env } . "\n
"; |
34 } | 34 } |
OLD | NEW |