You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lucien Weller <lu...@wellernet.ch> on 2005/05/15 00:33:22 UTC

Problems serving PDF to IE with ResourceReader

Hello!

I'm trying to serve a PDF file (but the problem is the same with other
formats like zip) using a ResourceReader. When I access the URL I've defined
for this reader an "Open/Save As" dialog is displayed by IE. But when I try
to open or save the PDF file I get an error box saying that this internet
site cannot be accessed! With Mozilla everything works fine. There is also
no problem with files that can be displayed directly in IE (like MS Word
oder Excel): this files are correctly opened in browser window.

Cocoon version: Cocoon 2.1.7

sitemap config:
---snip---
<map:readers default="resource">
	<map:reader name="resource"
src="org.apache.cocoon.reading.ResourceReader"/>
</map:readers>

...

<map:match type="wildcard" pattern="test-resource">
	<map:read src="static/test.pdf" mime-type="application/pdf"/>
</map:match>
---snip---

Thanks,

Lucien Weller


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


RE: Problems serving PDF to IE with ResourceReader

Posted by Lucien Weller <lu...@wellernet.ch>.
Hi Again,

After some futher inverstigation I found that the problem is related to
Vary:Host HTTP herader.

It it seems that Cocoon always sets this header with redirects. If
implemented a simple reader from scratch that doesn't set Vary header. If I
call a pipeline with this reader directly, it works fine, but if I access
through a redirect the Vary:Host header is set again.

I tried to show in source code of Cocoon 2.1.7 where this header is set, but
I couldn't find the right place.

Tnaks for further help.

Lucien


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