cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franco pace <>
Subject Re: http headers
Date Mon, 27 Aug 2007 09:51:24 GMT
Hi Grzegorz,

I have been using cocoon for quite a while developing REST ish web 
services. REST is now gaining
great momentum. REST relies heavily on HTTP protocol and in particular 
in returning specific http status codes
under certain conditions. For example, say I have a pipeline that 
exposes a db row (or resource):

<map:match pattern="someentity/*" >

Here the * would be an id of some sort.

so i may wish the GET the entity at url - 

 I would like for example, to set the http status code to 403 if the 
client does not
have authority to view the data, and to say 404 if the entity does not 
exist (not found).

Thanks again,

Grzegorz Kossakowski wrote:
> franco pace pisze:
>> Thanks Nico,
>> The transformer is just what I require for the headers. But I don't see
>> how it can be used to set the http response status code (200, 500 etc).
>> Also I am using cocoon version 2.1.10. This transformer is not included
>> in the std distribution. Are there any other little pieces of
>> cocoon magic that are hidden from me?
> Franco, my I ask why do you need to set headers/response code in transformer?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message