Geoffrey Young wrote:
RobertCZ wrote:
  
RobertCZ wrote:
    
I'm playing with Apache::ImageMagick under mod_perl 2 and
Apache::compat (mainly because AIM needs Apache::File which is not
supported under mp2). AIM/mp2 returns the correct modified file but
with wrong file size (size of the original file, not the modified
one). It does work under mod_perl 1, could this be Apache::compat bug?
If yes, any idea how it could  fixed? 
      
Well, now I got rid of Apache::compat (changed Apache::File to
FileHandle/File::Temp) and I got the same problem, so Apache::compat is
innocent Could it be that PerlFixupHandler in mp2 needs to set length
manually when it's different from the original file while mp1
recalculates it automaticaly? Thanks for your help.
    

well, you message is sufficiently vague since I don't have the
Apache::ImageMagick code handy :)

but I suspect that you mean that the module sets $r->filename and with mp1
the new filename's stat info is updated, but with mp2 it is not?  if so,
yes, this is proper - mp1 did magic behind the scenes for you.

with mp2 you need to update the stat info yourself each time you update
$r->filename. something like this:

  $r->filename($newfile);
  $r->finfo(APR::Finfo::stat($newfile, APR::FINFO_NORM, $r->pool));
  

Yes, you're answering exactly the question I was trying to ask ;-) Thank a lot.

- Robert

Reply via email to