You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2003/10/10 12:11:29 UTC
[RT] Changing the mime type setting of a reader
Hi,
during our bug hunting session we came across bug 10277
that contains a discussion about the mime type handling
of a reader.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277
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.
For more info you can have a look at bugzilla.
Now, we can either agree on the above, come to a different solution
or leave it as is. Either way, I want to close this bug :)
Carsten
Re: [RT] Changing the mime type setting of a reader
Posted by Joerg Heinicke <jh...@virbus.de>.
Carsten Ziegeler wrote:
> I'm +0 on this, so we can:
> a) start a vote
> or
> b) close the bug with "wontfix"
>
> Carsten
a) +0.5
Joerg
>>-----Original Message-----
>>From: Joerg Heinicke [mailto:jheinicke@virbus.de]
>>
>>No opinions on this? Does this mean nobody needs this feature? IMO it's
>>not that important, but it can at least shorten the sitemap component
>>declaration a bit. So I would like to have it.
>>
>>Joerg
>>
>>On 10.10.2003 12:11, Carsten Ziegeler wrote:
>>
>>>Hi,
>>>
>>>during our bug hunting session we came across bug 10277
>>>that contains a discussion about the mime type handling
>>>of a reader.
>>>
>>>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277
>>>
>>>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.
>>>
>>>For more info you can have a look at bugzilla.
>>>
>>>Now, we can either agree on the above, come to a different solution
>>>or leave it as is. Either way, I want to close this bug :)
>>>
>>>
>>>Carsten
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
Re: [RT] Changing the mime type setting of a reader
Posted by Tony Collen <co...@umn.edu>.
Andrew Savory wrote:
> On Mon, 20 Oct 2003, Carsten Ziegeler wrote:
>
>
>>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.
+1 for the swapped order, the user should *always* have control over
something that might happen automagically.
Tony
>
>
> Works for me!
>
> Andrew.
>
RE: [RT] Changing the mime type setting of a reader
Posted by Andrew Savory <an...@luminas.co.uk>.
On Mon, 20 Oct 2003, Carsten Ziegeler wrote:
> 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.
Works for me!
Andrew.
--
Andrew Savory Email: andrew@luminas.co.uk
Managing Director Tel: +44 (0)870 741 6658
Luminas Internet Applications Fax: +44 (0)700 598 1135
Orixo alliance: http://www.orixo.com/ Web: www.luminas.co.uk
RE: [RT] Changing the mime type setting of a reader
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
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
RE: [RT] Changing the mime type setting of a reader
Posted by Andrew Savory <an...@luminas.co.uk>.
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?
Andrew.
--
Andrew Savory Email: andrew@luminas.co.uk
Managing Director Tel: +44 (0)870 741 6658
Luminas Internet Applications Fax: +44 (0)700 598 1135
Orixo alliance: http://www.orixo.com/ Web: www.luminas.co.uk
RE: [RT] Changing the mime type setting of a reader
Posted by Reinhard Poetz <re...@apache.org>.
From: Bertrand Delacretaz [mailto:bdelacretaz@apache.org]
> I'm +0.9 on this, cannot help ATM but the logic suggested
> below sounds
> good to me.
This sounds good to mee too.
Reinhard
>
> -Bertrand
>
>
> >> 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.
> > ...
Re: [RT] Changing the mime type setting of a reader
Posted by Bertrand Delacretaz <bd...@apache.org>.
I'm +0.9 on this, cannot help ATM but the logic suggested below sounds
good to me.
-Bertrand
>> 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.
> ...
RE: [RT] Changing the mime type setting of a reader
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
I'm +0 on this, so we can:
a) start a vote
or
b) close the bug with "wontfix"
Carsten
> -----Original Message-----
> From: Joerg Heinicke [mailto:jheinicke@virbus.de]
> Sent: Sunday, October 19, 2003 10:13 PM
> To: dev@cocoon.apache.org
> Subject: Re: [RT] Changing the mime type setting of a reader
>
>
> No opinions on this? Does this mean nobody needs this feature? IMO it's
> not that important, but it can at least shorten the sitemap component
> declaration a bit. So I would like to have it.
>
> Joerg
>
> On 10.10.2003 12:11, Carsten Ziegeler wrote:
> > Hi,
> >
> > during our bug hunting session we came across bug 10277
> > that contains a discussion about the mime type handling
> > of a reader.
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277
> >
> > 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.
> >
> > For more info you can have a look at bugzilla.
> >
> > Now, we can either agree on the above, come to a different solution
> > or leave it as is. Either way, I want to close this bug :)
> >
> >
> > Carsten
>
Re: [RT] Changing the mime type setting of a reader
Posted by Joerg Heinicke <jh...@virbus.de>.
No opinions on this? Does this mean nobody needs this feature? IMO it's
not that important, but it can at least shorten the sitemap component
declaration a bit. So I would like to have it.
Joerg
On 10.10.2003 12:11, Carsten Ziegeler wrote:
> Hi,
>
> during our bug hunting session we came across bug 10277
> that contains a discussion about the mime type handling
> of a reader.
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277
>
> 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.
>
> For more info you can have a look at bugzilla.
>
> Now, we can either agree on the above, come to a different solution
> or leave it as is. Either way, I want to close this bug :)
>
>
> Carsten