Skip Menu |

This queue is for tickets about the CGI-Simple CPAN distribution.

Report information
The Basics
Id: 35844
Status: resolved
Worked: 10 min
Priority: 0/
Queue: CGI-Simple

People
Owner: andy [...] hexten.net
Requestors: damjan [...] mailermailer.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.103
Fixed in: (no value)



Subject: sysread used in CGI::Simple blocks on re-directed STDIO reads
For post requests that come in through SCGI: my $req = SCGI::Request->_new($sock,1); # blocking socket mode for CGI module we used to do local STDIN local *STDIN = $req->connection; so $cgi = CGI->new() would get all the data. For CGI::Simple, as it's using sysread it just stalls at this step: elsif ( $method eq 'POST') { 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 sysread( STDIN, $data, $length ); If it's switched to read, everything works.
Thanks Damjan - I've just released 1.104 which replaces sysread with read. It should hit CPAN within an hour.