cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: Cannot easily set http status
Date Wed, 05 Nov 2003 11:19:10 GMT
 

> 
> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org] 
> Sent: woensdag 5 november 2003 0:12
> To: dev@cocoon.apache.org
> 
> 
> On Tuesday, Nov 4, 2003, at 14:21 Europe/Rome, Unico Hommes wrote:
> 
> >
> > Working on davmap I noticed that the way I was setting the 
> status code 
> > in the Serializer wasn't working. This is what I do:
> >
> > <map:match pattern="status/*">
> >   <map:generate src="status.xml" />
> >   <map:serialize type="xml" status-code="{1}" /> </map:match>
> >
> > But it seems that the status-code attribute is not being 
> resolved. I 
> > propose we change this.
> 
> -1, don't know but I don't like this. should be in the fom as 
> you propose below.
> 

Yes I guess the use case is not a valid argument for making the
attribute variable resolved.

> > Then I thought I may be able to set it on fom response 
> object in the 
> > flow. But this too seems not to be possible. However, changing this 
> > seems to be a little more straightforward since setStatus is not a 
> > method on the environment Response interface but on the 
> HttpResponse 
> > implementation instead. I propose we add this method to the fom and 
> > make it a nop in case we are dealing with a different Response 
> > implementation than HttpResponse.
> 
> +1
> 

setStatus' friends the sendError brothers are also be eligible for FOM
membership. But this change has a dependency on the discussion about
bodyless responses since if you'd do a sendError from a flow script and
then send a page afterwards this would result in errors.

> 
> 
> >
> > Thoughts?
> >
> > -- Unico
> >
> >
> --
> Stefano.
> 
> 
> 

Mime
View raw message