cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [RT] Changing the mime type setting of a reader
Date Mon, 20 Oct 2003 09:53:21 GMT
Andrew Savory wrote:

>
> Sorry, missed the start of this thread.
>
:)

> On 10.10.2003 12:11, Carsten Ziegeler wrote:
> > ...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.
> > ...
>
> I'm not sure that the second and third items are in the right order.
>
> Consider, for example, sending out xhtml docs ... (no, I don't know why
> you'd use a reader, but bear with me)
>
> The reader component might declare that it should be sent out as
> text/html. But given the doc is xml, the reader would peak in to the file
> and see that it is xml, and set the type as application/xml.
>
> This would mean I'd have to explicitly declare a mime type in every reader
> instance, rather than once for the component.
>
> Thoughts?
>
Ok, rethinking it - I think you're right. So what about swapping the second
and third item:

> > - 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.

Carsten


Mime
View raw message