cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franco pace <franco.p...@tpg.com.au>
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 - 
http://myhost/cocoon/someentity/104

 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,
Franco

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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message