summaryrefslogtreecommitdiff
path: root/tests/docroot/www/get-post-len.pl
blob: 82276bd64cdf6f8b3fdb76ac70c8473b78f4ec19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env perl

print "Content-Type: text/plain\r\n\r\n";

if ($ENV{"REQUEST_METHOD"} eq "POST") {
	my $l = 0;
	while(<>) {
		$l += length($_);
	}
	print $l;
} else {
	print "0";
}