chromium/third_party/blink/web_tests/http/tests/xmlhttprequest/resources/post-echo-as-ascii.cgi

#!/usr/bin/perl -wT

print "Content-type: text/plain\n\n"; 

if ($ENV{'REQUEST_METHOD'} eq "POST") {
    read(STDIN, $request, $ENV{'CONTENT_LENGTH'})
                || die "Could not get query\n";
    my @array = split //, $request;
    @array = map(ord, @array);
    print "@array";
} else {
    print "Wrong method: " . $ENV{'REQUEST_METHOD'} . "\n";
}