OLD | NEW |
1 #!/usr/bin/perl -wT | 1 #!/usr/bin/perl -wT |
2 | 2 |
3 # Flush STDOUT after each print. | 3 # Flush STDOUT after each print. |
4 select (STDOUT); | 4 select (STDOUT); |
5 $| = 1; | 5 $| = 1; |
6 | 6 |
7 print "Content-Type: text/html; charset=utf-8\n"; | 7 print "Content-Type: text/html; charset=utf-8\n"; |
8 print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n"; | 8 print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n"; |
9 print "Cache-Control: no-store, no-cache, must-revalidate\n"; | 9 print "Cache-Control: no-store, no-cache, must-revalidate\n"; |
10 print "Pragma: no-cache\n"; | 10 print "Pragma: no-cache\n"; |
11 print "\n"; | 11 print "\n"; |
12 | 12 |
13 print "\xef\xbb\xbf<!DOCTYPE html><body>"; | 13 print "\xef\xbb\xbf<!DOCTYPE html><body>"; |
14 print "<script>if (window.testRunner) window.testRunner.dumpAsText();</script>"; | 14 print "<script>if (window.testRunner) window.testRunner.dumpAsText();</script>"; |
15 print "<img src='404.gif' onerror='document.write(\"PASS\"); document.close()'>"
; | 15 print "<img src='404.gif' onerror='document.write(\"PASS\");'>"; |
16 # Dump some spaces to bypass CFNetwork buffering. | 16 # Dump some spaces to bypass CFNetwork buffering. |
17 for ($count = 1; $count < 4000; $count++) { | 17 for ($count = 1; $count < 4000; $count++) { |
18 print " "; | 18 print " "; |
19 } | 19 } |
20 | 20 |
21 # Delay to force the second line of text to be decoded as a separate chunk. | 21 # Delay to force the second line of text to be decoded as a separate chunk. |
22 sleep 1; | 22 sleep 1; |
23 print "FAIL</body>"; | 23 print "FAIL</body>"; |
OLD | NEW |