George S. Baugh hace 5 años
padre
commit
11b5a6f837
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1 4
      www/server.psgi

+ 1 - 4
www/server.psgi

@@ -116,10 +116,7 @@ my $app = sub {
     if ($env->{REQUEST_METHOD} eq 'POST') {
 
         my $body = HTTP::Body->new( $env->{CONTENT_TYPE}, $env->{CONTENT_LENGTH} );
-        my $len = $env->{CONTENT_LENGTH};
-        while ( $len ) {
-            read($env->{'psgi.input'}, my $buf, ($len < $CHUNK_SIZE) ? $CHUNK_SIZE : $len );
-            $len -= length($buf);
+        while ( read($env->{'psgi.input'}, my $buf, $CHUNK_SIZE) ) {
             $body->add($buf);
         }