On Fri, 6 May 2005, Steve Hay wrote:
Markus Wichitill wrote:
[ .. ]
I guess you two didn't remove the "if (!size)" check like I did?
Shit. How dumb am I?
You're absolutely right -- you have to remove the size check as well in order for Randy's fix to even be reached! With this change in place too I now have all tests successful :-)
Thanks, Markus! - Steve
I forgot too to do that ... Would the following be OK?
Index: src/modules/perl/modperl_util.c =================================================================== --- src/modules/perl/modperl_util.c (revision 168597) +++ src/modules/perl/modperl_util.c (working copy) @@ -616,10 +616,12 @@ size = r->finfo.size; sv = newSV(size);
+ /* allow SLURP_SUCCESS() below an opportunity to set error if (!size) { sv_setpvn(sv, "", 0); return newRV_noinc(sv); } + */
/* XXX: could have checked whether r->finfo.filehand is valid and * save the apr_file_open call, but apache gives us no API to ==========================================================
Or would it be better to wrap the if(!size) { } within an #ifndef WIN32?
Why commenting out? Just remove it completely. I believe I've added it as an optimization, to save the open call when we know that the file size is zero, but it is probably not not a normal case.
I've tested the removal on linux, all tests pass.
Thanks Randy.
-- __________________________________________________________________ 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