Liu, Hui (GXS) wrote:
Stas,

Yes we tried reading <STDIN> and it works:

    while ($readData = <STDIN>) {
        $buffer        .= $readData;
        $bufferLength   = length($buffer);
        ......
    }

But it's not working with sysread or read, here are the results for read, the last line is what we expected but it's null:

   while ($bytesRead = read(STDIN, $buffer, 4096)) {
        &html("bytesRead=[$bytesRead] data=[$buffer]") if ($debug);
    }

Here's the results from the above code :

I suggest that you look at the implementation of the function read_multipart() in CGI.pm, which does exactly what you want. (I see no reason why not using CGI.pm in first place if you can.)


And please, refrain from posting emails with huge chunks of useless information, in the future. Truncate to keep only the information that may help to understand and reproduce the problem.

__________________________________________________________________
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



Reply via email to