OLD | NEW |
1 #!/usr/bin/perl -wT | 1 #!/usr/bin/perl -wT |
2 use strict; | 2 use strict; |
3 use CGI; | 3 use CGI; |
4 | 4 |
5 my $cgi = new CGI; | 5 my $cgi = new CGI; |
6 | 6 |
7 if ($cgi->param('enable-full-block')) { | 7 if ($cgi->param('enable-full-block')) { |
8 print "X-XSS-Protection: 1; mode=block\n"; | 8 print "X-XSS-Protection: 1; mode=block\n"; |
| 9 } else { |
| 10 print "X-XSS-Protection: 1\n"; |
9 } | 11 } |
10 print "Content-Type: text/html; charset=UTF-8\n\n"; | 12 print "Content-Type: text/html; charset=UTF-8\n\n"; |
11 | 13 |
12 print "<!DOCTYPE html>\n"; | 14 print "<!DOCTYPE html>\n"; |
13 print "<html>\n"; | 15 print "<html>\n"; |
14 print "<head>\n"; | 16 print "<head>\n"; |
15 print "<script>\n"; | 17 print "<script>\n"; |
16 print "window.onload = function()\n"; | 18 print "window.onload = function()\n"; |
17 print "{\n"; | 19 print "{\n"; |
18 print " var event = document.createEvent('MouseEvent');\n"; | 20 print " var event = document.createEvent('MouseEvent');\n"; |
(...skipping 11 matching lines...) Expand all Loading... |
30 # after the redirect has occurred. | 32 # after the redirect has occurred. |
31 print "<p>If you see this message then the test FAILED.</p>\n"; | 33 print "<p>If you see this message then the test FAILED.</p>\n"; |
32 } else { | 34 } else { |
33 print "<script>\n"; | 35 print "<script>\n"; |
34 print "if (window.testRunner)\n"; | 36 print "if (window.testRunner)\n"; |
35 print " testRunner.notifyDone();\n"; | 37 print " testRunner.notifyDone();\n"; |
36 print "</script>\n"; | 38 print "</script>\n"; |
37 } | 39 } |
38 print "</body>\n"; | 40 print "</body>\n"; |
39 print "</html>\n"; | 41 print "</html>\n"; |
OLD | NEW |