Subject: | Unable upload large files from $handle other than STDIN |
perhaps, at _save_tmpfile() in CGI/Simple.pm :
- last unless _internal_read( $self, \*STDIN, $data );
+ last unless _internal_read( $self, $handle, $data );
$ perl -e 'use CGI::Simple; say $CGI::Simple::VERSION'
1.112
$ perldoc -m CGI::Simple | grep -n _internal_read
304:sub _internal_read($*\$;$) {
335: last unless _internal_read( $self, $handle, my $buffer );
358: _internal_read( $self, $handle, $data, $length );
360: last unless _internal_read( $self, $handle, my $buffer );
484: last READ unless _internal_read( $self, $handle, my $buffer );
575: last unless _internal_read( $self, \*STDIN, $data );
$ perl -ne 'if (1 .. 575) { /^sub\s+(\w+)/ and $n = $1 } END { say $n }'
`perldoc -ml CGI::Simple`
_save_tmpfile
$ perl -ne 'print if 575-3 .. 575+3' `perldoc -ml CGI::Simple`
while ( $got_data < $length ) {
my $buffer = $data;
last unless _internal_read( $self, \*STDIN, $data );
# fixed hanging bug if browser terminates upload part way through
# thanks to Brandon Black