OLD | NEW |
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 | 2 |
3 $count = 1; | 3 $count = 1; |
4 | 4 |
5 @cookies = split(/;/, $ENV{'HTTP_COOKIE'}); | 5 @cookies = split(/;/, $ENV{'HTTP_COOKIE'}); |
6 foreach $pair (@cookies) | 6 foreach $pair (@cookies) |
7 { | 7 { |
8 ($name, $value) = split(/=/, $pair); | 8 ($name, $value) = split(/=/, $pair); |
9 | 9 |
10 $name =~ s/^\s+//; | 10 $name =~ s/^\s+//; |
11 $name =~ s/\s+$//; | 11 $name =~ s/\s+$//; |
12 | 12 |
13 if ($name eq "redirect-cycle-count") { | 13 if ($name eq "redirect-cycle-count") { |
14 $count = $value; | 14 $count = $value; |
15 } | 15 } |
16 } | 16 } |
17 | 17 |
18 if ($count eq 1) { | 18 if ($count eq 1) { |
19 print "Status: 302 Moved Temporarily\r\n"; | 19 print "Status: 302 Moved Temporarily\r\n"; |
20 print "Location: redirect-cycle-2.pl\r\n"; | 20 print "Location: redirect-cycle-2.pl\r\n"; |
21 print "Content-type: text/html\r\n"; | 21 print "Content-type: text/html\r\n"; |
22 print "Set-Cookie: redirect-cycle-count=2\r\n"; | 22 print "Set-Cookie: redirect-cycle-count=2\r\n"; |
(...skipping 10 matching lines...) Expand all Loading... |
33 print "<head>"; | 33 print "<head>"; |
34 print "<script type='text/javascript'>"; | 34 print "<script type='text/javascript'>"; |
35 print "function startTest() { testRunner.dumpBackForwardList(); }"; | 35 print "function startTest() { testRunner.dumpBackForwardList(); }"; |
36 print "</script>"; | 36 print "</script>"; |
37 print "</head>"; | 37 print "</head>"; |
38 print "<body onload='startTest();'>"; | 38 print "<body onload='startTest();'>"; |
39 print "<div>Page 3</div>"; | 39 print "<div>Page 3</div>"; |
40 print "</body>"; | 40 print "</body>"; |
41 print "</html>"; | 41 print "</html>"; |
42 } | 42 } |
OLD | NEW |