if ( $length ) { # we may not get all the data we want with a single read on large # POSTs as it may not be here yet! Credit Jason Luther for patch # CGI.pm < 2.99 suffers from same bug read( STDIN, $data, $length ); while ( length($data) < $length ) { last unless read( STDIN, my $buffer, 4096 ); $data .= $buffer; } unless ( $length == length $data ) { $self->cgi_error( "500 Bad read on POST! wanted $length, got ".(length $data) ); return; } } #### if($content_length > 0) { my $len = $content_length; while ($len > 0) { my $data = ''; my $read = $self->read_from_client(\$data,$len,0); last unless $read; $len -= $read; $query_string .= $data; } }