Antonio Gallardo wrote:
<cita quién="Jorg Heymans">


Jeremy Quinn wrote:

<snip/>

Yes, I was one of the people always doing that !!!
I always assumed you needed to add the mime-type to the <map:read/> so
needed specific pipelines for each type.

Thanks for the tip !!!

How does cocoon send the mimetype of a file then? Does it have a mime.types somewhere internally like apache? Or does it rely on the browser to interprete the binary stream correctly or guess it from the file extension?


Yep. From the file extension. Defined in the web.xml. For example in
Tomcat See:

$TOMCAT_HOME/conf/web.xml

For the no-defined applications, we can also add new ones in the Cocoon
web.xml file.

Search for mime in both files.
Hi all,

this bothered me yesterday and I make some test with pdf, doc, rtf, xls documents. The reader send doc and xls docs at text when no mime-type attribute is given at the sitemap. There is also no Content Header added without the mime-type attribute.

But the source says:
public String getMimeType() {
        Context ctx = ObjectModelHelper.getContext(objectModel);
        if (ctx != null) {
            final String mimeType = ctx.getMimeType(source);
            if (mimeType != null) {
                return mimeType;
            }
        }

        return inputSource.getMimeType();
    }
so if I see it correct the header should always appended. or I'm wrong?

Klaus

Reply via email to