Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / resources / cross-site-progress-events.cgi
1 #!/usr/bin/perl -wT
2
3 print "Content-type: text/plain\n"; 
4
5 if ($ENV{'REQUEST_METHOD'} eq "POST") {
6     if ($ENV{'QUERY_STRING'} eq "allow") {
7         print "Access-Control-Allow-Origin: *\n";
8     }
9     print "\n";
10     if ($ENV{'CONTENT_LENGTH'}) {
11         read(STDIN, $request, $ENV{'CONTENT_LENGTH'}) || die "Could not get query\n";
12     } else {
13         $request = "";
14     }
15     print $request;
16 } else {
17     print "\n";
18     print "Wrong method: " . $ENV{'REQUEST_METHOD'} . "\n";
19