Carsten Ziegeler wrote:

Andrew Savory wrote:


On Mon, 20 Oct 2003, Carsten Ziegeler wrote:



Description:


...The suggestion is to change the behaviour to (or the order
to determine the mime type):

- MIME type declared on the reader instance
- Ask the Reader for a MIME type. A *.doc reader could peek into the file and return 
either text/plain or application/vnd.msword.
- MIME type declared for the reader component
- MIME type declared in WEB-INF/web.xml or by the server.

Because, *if* I set a mime type for the reader instance I will overide the information with this.



-1 on that one, as the second item overrides explicit settings put by the sitemap writer on the <map:reader> definition and thus makes @mime-type in the component definition unusable for readers returning non-null values.


+1 with 2nd and 3rd swapped, so:


- MIME type declared on the reader instance
- MIME type declared for the reader component
- Ask the Reader for a MIME type. A *.doc reader could peek into the file and return 
either text/plain or application/vnd.msword.
- MIME type declared in WEB-INF/web.xml or by the server.


+1 for this order, as it is the more natural from specific to general behaviour.


IIRC, there was a bug in Tomcat if response.setContentType(null) was called. Don't know if it has been fixed, but Cocoon should take care of not doing this.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to