Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 89631 invoked from network); 29 Nov 2004 15:15:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Nov 2004 15:15:10 -0000 Received: (qmail 10270 invoked by uid 500); 29 Nov 2004 15:15:05 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 10200 invoked by uid 500); 29 Nov 2004 15:15:05 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 10185 invoked by uid 99); 29 Nov 2004 15:15:05 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.187) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 29 Nov 2004 07:15:03 -0800 Received: from [212.227.126.179] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CYnEw-0003UJ-00 for dev@cocoon.apache.org; Mon, 29 Nov 2004 16:14:58 +0100 Received: from [213.70.183.170] (helo=[127.0.0.1]) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CYnEv-0008Gf-00 for dev@cocoon.apache.org; Mon, 29 Nov 2004 16:14:58 +0100 Message-ID: <41AB3D28.2090100@kbsm.de> Date: Mon, 29 Nov 2004 16:15:52 +0100 From: Klaus Bertram User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Cleanup forms/samples/resources References: <20041127154952.30056.qmail@minotaur.apache.org> <41A8A442.8080209@apache.org> <41A8B8AE.6090501@apache.org> <6DC83648-4205-11D9-85BF-000D9336FCE4@media.demon.co.uk> <39628.10.0.0.54.1101737275.squirrel@ags01.agsoftware.dnsalias.com> In-Reply-To: <39628.10.0.0.54.1101737275.squirrel@ags01.agsoftware.dnsalias.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0448-1, 26.11.2004), Outbound message X-Antivirus-Status: Clean X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:9822c74021ffb9818d886cf47186e5cb X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Antonio Gallardo wrote: > > >> >>Jeremy Quinn wrote: >> >> >> >>>Yes, I was one of the people always doing that !!! >>>I always assumed you needed to add the mime-type to the 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