summaryrefslogtreecommitdiffstats
path: root/tests/testserver/apache2/testdata/www/cgi-bin/echo.cgi
blob: 16315a3db6dcae26cdc06d72febf23b6c3c8e5e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl

if ($ENV{'REQUEST_METHOD'} eq "GET") {
    $request = $ENV{'QUERY_STRING'};
} elsif ($ENV{'REQUEST_METHOD'} eq "POST") {
    read(STDIN, $request, $ENV{'CONTENT_LENGTH'}) || die "Could not get query\n";
}

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