cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luigi Bai <lpb+coc...@focalpoint.com>
Subject Re: When to set mime-type
Date Wed, 27 Oct 2004 15:16:10 GMT
On Wed, 27 Oct 2004, Vadim Gritsenko wrote:

> Luigi Bai wrote:
>> 
>> I would like to consider allowing the mime-type to be set during 
>> processing, perhaps even as late as after endDocument().
>
> No, that's against "Cocoon Way". I'd even say, *all* headers should be set 
> *before* startDocument, during pipeline assembly & setup stages. What's 
> happening in ResourceReader currently WRT headers should be fixed - IIRC 
> there is either Bugzilla entry for this or an email in archive.
>
> Vadim
>

Vadim, that approach doesn't allow the content to tell the container what 
it is - is it reasonable to set ContentLength, Expires, etc. ahead of time 
in all cases? I think you're describing a system which is inflexible, and 
which precludes valid use cases. I'd prefer the "Cocoon Way" to be the 
default way things operate, but that edge cases are even *possible*, not 
precluded.

Luigi

Mime
View raw message