On Fri, 30 Jun 2000, Cyrus Rahman wrote:
> Hmm, I was just adapting a large application I wrote some years ago to work
> with mod_perl. Much to my amazement, despite its complexity and the fact that
> it was largely written before mod_perl, it worked without modification! Well,
> almost. There is one problem:
>
> When handling form uploads, it calls read() from perl and expects it to act
> just like the perl version. But Apache.pm's read() does one notable thing
> differently. If you do a 'read(STDIN, $buf, $size)', Apache.pm's read
> concatenates the new data to the previous contents of $buf instead of replacing
> it.
>
> Now it is not that hard to clear the buffer before each read, but the unusual
> behavior breaks other things too, like the form uploads in CGI_Lite. Is the
> concatenation an intentional feature, or is it a bug?
hmm, Apache::read() has not been touched for something like 2-3 years. i
don't recall if it's a feature (e.g. something CGI.pm needs), so i
hesitate to change it at this point.
> Besides this it really is remarkable how perfectly mod_perl reproduces the CGI
> environment!
good news :)