You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "phung.ano" <ph...@laposte.net> on 2003/10/28 21:25:09 UTC

Cannot serve static binary files

Dear all,

I really need some help about a problem with Cocoon and
serving static binary files. 
I would like to make available for download some .zip and .jar
files through Cocoon for some reasons.
So I followed the example given in the Cocoon Wiki pages about
serving static files.

I add the following lines in my sitemap :
<map:match pattern="**.jar">
   <map:read src="jars/{1}.jar"
mime-type="application/java-archive"/>
</map:match>

The problem is that the files are always transfered in text mode
whatever i do, so that the files are corrupted once downloaded.
(any 0A are replaced by 0D, and there is an additional
 0A at the end of the file)

I tried several other things without any success:
- In the sitemap i tried other mime types:
application/octet-stream, application/zip (for zip files), aso.

- on the client side (Windows 2000), i use IE 6, then mozilla
firebird 0.7.

nothing works !

my server environment is:
Linux Redhat 7.3
Cocoon 2.1m3 (with jetty)
j2sdk/jre 1.4.1

Any idea ?

Phou Ung

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




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


Re: Cannot serve static binary files

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Joerg Heinicke wrote:
> I wonder why it works in our ConWeb application:

It works under certain circumstances. See
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277
for a complete discussion.

J.Pietschmann


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


Re: Cannot serve static binary files

Posted by Joerg Heinicke <jh...@virbus.de>.
J.Pietschmann wrote:
> phung.ano wrote:
> 
>> - In the sitemap i tried other mime types:
>> application/octet-stream, application/zip (for zip files), aso.
> 
> 
> Not implemented yet. Any value in the sitemat (pipeline definition)
> is silently ignored.
> 
> Register *.jar as application/octet-stream with your servlet
> engine, for example by putting it into Cocoons web.xml or
> into the the system web.xml.

I wonder why it works in our ConWeb application:

<map:match pattern="*/*.xul">
   <map:read src="{2}.xul" mime-type="application/vnd.mozilla.xul+xml">
     <map:parameter name="expires" value="14400000"/>
   </map:read>
</map:match>

I can change the mime-type to text/plain and don't get the XUL file 
displayed any longer but the source code in text mode.

It's Cocoon 2.0.4.

Joerg

-- 
System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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


Re: Cannot serve static binary files

Posted by "J.Pietschmann" <j3...@yahoo.de>.
phung.ano wrote:
> - In the sitemap i tried other mime types:
> application/octet-stream, application/zip (for zip files), aso.

Not implemented yet. Any value in the sitemat (pipeline definition)
is silently ignored.

Register *.jar as application/octet-stream with your servlet
engine, for example by putting it into Cocoons web.xml or
into the the system web.xml.

J.Pietschmann


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