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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 658
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 # CGI.pm < 2.99 suffers from same bug sysread( STDIN, $data, $length ); If it's switched to read, everything works.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-29628-1210693571-1734.35844-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 112
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.