cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.com>
Subject Re: Cannot easily set http status
Date Tue, 04 Nov 2003 23:53:14 GMT
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.

Within Lenya I use the status-code attribute as follows
(src/webapp/lenya/pubs/blog/webdav.xmap)

<map:serialize type="xml" status-code="204"/>

which works, but maybe the problem is the {1}

HTH

Michi


> 
> 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.
> 
> Thoughts?
> 
> -- Unico
> 


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org



Mime
View raw message