You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Eiko Thomas <ei...@gmx.net> on 2005/04/01 15:04:45 UTC

Re: Problems with fop and content-type response header

Hi,
I found the reason of the problem.

My sitemap used
 ...
 <map:match pattern="pics/*.gif">
     <map:read mime-type="image/gif" src="resources/pics/{1}.gif"/>
 </map:match>
 ...

to deliver pictures and the defaultreader was 
'org.apache.cocoon.reading.ResourceReader'. This procedure worked fine 
with cocoon 2.1.5 and cocoon 2.1.6 but with version 2.1.7 fop can't 
handle images which are sent with this reader (fop creates damaged pdf 
files). The reason seems to be the content-type response header ...

After changing the sitemap to
  ...
 <map:match pattern="pics/*.gif">
     <map:read type="image" mime-type="image/gif" 
src="resources/pics/{1}.gif"/>
 </map:match>
 ...
'org.apache.cocoon.reading.ImageReader' is used and all works fine :-)
In my application the content-type problem has only effects with fop.

Eiko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org