Hi,
In using mod_perl 1.28 on Linux (Slackware 8.1) with Apache (Server: Apache/1.3.24 (Unix) mod_ssl/2.8.8 OpenSSL/0.9.6c mod_perl/1.28 PHP/4.3.1)
I have had problems with scripts that read from STDIN.
In particular the problem arises when attempting to call read() to read from STDIN into a buffer. The result was that read would return the correct number
of bytes read, but the buffer would be empty.
Further investigation showed that if the requested number of bytes was less than or equal to the available amount of input then the call would be successful, otherwise the buffer would come back undefined. In the case that the requested number of bytes was larger than the available number of bytes, the returned number of bytes would still equal the available number of bytes.
This ultimately lead to looking at the implementation of read() in Apache.pm. It would seem that there is a slight bug in the handling of the return values from read_client_block().
The patch below will change the behaviour to be more in line with the expected behaviour of read().
Thank you, Stewart, for the analysis and the patch. I've added it to the list of the available patches (in the STATUS file) and I believe Philippe has planned to handle that soonish.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
