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

Owner: andy [...]
Requestors: damjan [...]

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

Subject: sysread used in CGI::Simple blocks on re-directed STDIO reads
Download (untitled) / with headers
text/plain 658b
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 # < 2.99 suffers from same bug sysread( STDIN, $data, $length ); If it's switched to read, everything works.
Download (untitled) / with headers
text/plain 112b
Thanks Damjan - I've just released 1.104 which replaces sysread with read. It should hit CPAN within an hour.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to