Re: AIM/mp2 Apache::compat bug?

[prev] [thread] [next] [Date index for 2004/11/23]

From: RobertCZ
Subject: Re: AIM/mp2 Apache::compat bug?
Date: 16:31 on 23 Nov 2004
--------------080008020008060502010208
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------080008020008060502010208
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Geoffrey Young wrote:<br>
<blockquote cite="mid41A3331E.6070402@xxxxxxxxxxxxxxx.xxx" type="cite">
  <pre wrap="">RobertCZ wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">RobertCZ wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">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? 
      </pre>
    </blockquote>
    <pre wrap="">
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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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-&gt;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-&gt;filename. something like this:

  $r-&gt;filename($newfile);
  $r-&gt;finfo(APR::Finfo::stat($newfile, APR::FINFO_NORM, $r-&gt;pool));
  </pre>
</blockquote>
<br>
Yes, you're answering exactly the question I was trying to ask ;-)
Thank a lot.<br>
<br>
- Robert<br>
</body>
</html>

--------------080008020008060502010208--

(message missing)

Re: AIM/mp2 Apache::compat bug?
RobertCZ 07:33 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Geoffrey Young 12:54 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
RobertCZ 16:31 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Stas Bekman 16:56 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Malcolm J Harwood 17:17 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Stas Bekman 17:22 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Geoffrey Young 17:56 on 23 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Tom Schindl 16:06 on 24 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Geoffrey Young 19:08 on 24 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Stas Bekman 20:34 on 24 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Geoffrey Young 03:02 on 27 Nov 2004

Re: AIM/mp2 Apache::compat bug?
Stas Bekman 16:16 on 29 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52