Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 75873 invoked from network); 30 May 2006 16:20:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 May 2006 16:20:45 -0000 Received: (qmail 95375 invoked by uid 500); 30 May 2006 16:20:42 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 95307 invoked by uid 500); 30 May 2006 16:20:42 -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 List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 95296 invoked by uid 99); 30 May 2006 16:20:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 09:20:42 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MAILTO_TO_SPAM_ADDR,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ats37@hotmail.com designates 65.54.175.18 as permitted sender) Received: from [65.54.175.18] (HELO hotmail.com) (65.54.175.18) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 09:20:41 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 May 2006 09:20:20 -0700 Message-ID: Received: from 65.54.175.200 by by104fd.bay104.hotmail.msn.com with HTTP; Tue, 30 May 2006 16:20:19 GMT X-Originating-IP: [193.108.78.10] X-Originating-Email: [ats37@hotmail.com] X-Sender: ats37@hotmail.com From: "Andrew Stevens" To: dev@cocoon.apache.org Subject: FW: ResourceReader mime type auto-detection Date: Tue, 30 May 2006 17:20:19 +0100 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 30 May 2006 16:20:20.0920 (UTC) FILETIME=[F2761B80:01C68404] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N No response over in users@, so perhaps I'll have more luck here? :-) Andrew. >From: "Andrew Stevens" >Date: Fri, 26 May 2006 13:08:56 +0100 > >Hi, > >I have a pipeline that needs to serve up static files of any type from a >particular directory. And yes, I know it'd be more efficient to just have >the web server do it, but we don't control the server that hosts it and >there's constraints on the configuration & deployment process that mean we >have to do it this way. Previously, I was using a matcher for each file >extension, and specifying the corresponding mime-type parameter in the >map:read. However, I gather that if no mime-type is specified the resource >reader is supposed to determine the mime type automatically using >inputSource.getMimeType() on the (Excalibur) Source. So I tried replacing >my multiple matchers with just > > > > > >For PDFs and image files, this works just fine. However, MS >Word/Excel/Powerpoint files are displayed as text/binary within the browser >window rather than prompting to download or open them in the relevant >application. SWF files are also displayed as text rather than in the Flash >player/plugin. This appears to be because the Content-Type header is being >sent back as "text/html; charset=ISO-8859-1" rather than e.g. >application/vnd.ms-excel >I haven't checked every file type we use (yet) so there may be others that >also have the problem. > >Is this a known limitation of the resource reader? Does it only recognise >certain file types, or is there something else going on I'm not aware of >(e.g. missing some configuration somewhere)? I'm using Cocoon 2.1.7, >although the current SVN version on the 2_1_X branch doesn't appear to be >any different. > > >Andrew.