"Fossies" - the Fresh Open Source Software Archive

Member "lighttpd-1.4.54/tests/docroot/www/get-post-len.pl" (27 May 2019, 186 Bytes) of package /linux/www/lighttpd-1.4.54.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env perl
    2 
    3 print "Content-Type: text/plain\r\n\r\n";
    4 
    5 if ($ENV{"REQUEST_METHOD"} eq "POST") {
    6     my $l = 0;
    7     while(<>) {
    8         $l += length($_);
    9     }
   10     print $l;
   11 } else {
   12     print "0";
   13 }