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/20 11:22:03 UTC

[vote] Changing the mime type setting of a reader [was [RT]...]

Ok, then let's start a vote, we already have

Bertrand +0.9
Joerg    +0.5
Reinhard +1    (I hope this is correctly interpreted)
Carsten  +0

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.

Carsten 



Re: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Berin Loritsch <bl...@apache.org>.
Joerg Heinicke wrote:

> Carsten Ziegeler wrote:
> 
>> - 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.
>>
>> Is anyone who already voted against swapping 2nd and 3rd item?
>>
>> Carsten
> 
> Silent agreement :-)
> 

Key thing is what is the maximum predictability for this?

What is the difference between point 2 and 3?  In essence it is how it is
written.  Are you caching the mime-type info?  Is this something that could
be cached on a per URL basis?  If so, then we can avoid costly calls to the
underlying medium for the Readers after we have identified it.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


Re: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Joerg Heinicke <jh...@virbus.de>.
Carsten Ziegeler wrote:

>- 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.
>
> Is anyone who already voted against swapping 2nd and 3rd item?
> 
> Carsten

Silent agreement :-)

Joerg

-- 
System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


Re: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Tony Collen <co...@umn.edu>.
Sylvain Wallez wrote:


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

Here's my +1 for this order, but this time in the correct thread for ease of vote tallying.  Note to 
self: do not try to vote directly after waking up :)


Tony


Re: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
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



RE: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Andrew Savory <an...@luminas.co.uk>.
On Tue, 21 Oct 2003, Carsten Ziegeler wrote:

> There is one thing we forgot :) Is this a change for 2.2 or for 2.1.x?
> This change is (a little bit) incompatible, so it might be a
> candidate for 2.2.

Not sure of the status of 2.1 now - is it simply in "bugfixing" mode, with
all new features in 2.2?

Either way, I guess since it's incompatible, it should go in 2.2.


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: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Joerg Heinicke wrote:
> No one really missed it until now

This isn't quite correct. :-)

However, it isn't actually a really incompatible change, at least
for the provided Reader classes, it just adds a feature.

J.Pietschmann



Re: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Joerg Heinicke <jh...@virbus.de>.
Carsten Ziegeler wrote:
> Ok, I think we have enough votes with +(>0), I didn't count a -1 for
> this order of execution:
> 
>  - 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.
> 
> There is one thing we forgot :) Is this a change for 2.2 or for 2.1.x?
> This change is (a little bit) incompatible, so it might be a 
> candidate for 2.2.
> 
> What do you think?
> 
> Carsten

No one really missed it until now, so it's not urgent. Let's add it as a 
nice additional feature for 2.2.

Joerg

-- 
System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


RE: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Ok, I think we have enough votes with +(>0), I didn't count a -1 for
this order of execution:

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

There is one thing we forgot :) Is this a change for 2.2 or for 2.1.x?
This change is (a little bit) incompatible, so it might be a 
candidate for 2.2.

What do you think?

Carsten

RE: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Reinhard Poetz <re...@apache.org>.
From: Carsten Ziegeler

> 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 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.
> > 
> Is anyone who already voted against swapping 2nd and 3rd item?

+1 from me for the change

Reinhard


RE: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
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 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.
> 
Is anyone who already voted against swapping 2nd and 3rd item?

Carsten

Re: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Andrew Savory <an...@luminas.co.uk>.
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 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.


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: [vote] Changing the mime type setting of a reader [was [RT]...]

Posted by Reinhard Poetz <re...@apache.org>.
From: Carsten Ziegeler

> Ok, then let's start a vote, we already have
> 
> Bertrand +0.9
> Joerg    +0.5
> Reinhard +1    (I hope this is correctly interpreted)

yep

Reinhard

> Carsten  +0
> 
> 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.