You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Unico Hommes <Un...@hippo.nl> on 2003/08/04 17:36:30 UTC

Setting response status code from flow

Hi all,

I would like to be able to response.setStatus from the flow. I have two
scenarios I would like to use this:

1) In an authentication module where failure to authenticate should
result in 401 in order to give the browser the chance to recover from
being denied access to a certain resource.

2) In the davmap all responses that do not imply an http content body.

Currently the only way to set the status code in cocoon is by specifying
a status-code attribute on the serializer. This means that body-less
responses can only be programmed using some dummy pipeline as is done in
the current davmap sample.

What do other think? Are these convincing use cases for adding
response.setStatus to the FOM?

Regards,
Unico

Re: Setting response status code from flow

Posted by Geoff Howard <co...@leverageweb.com>.
Unico Hommes wrote:
> Hi all,
> 
> I would like to be able to response.setStatus from the flow. I have two
> scenarios I would like to use this:
> 
> 1) In an authentication module where failure to authenticate should
> result in 401 in order to give the browser the chance to recover from
> being denied access to a certain resource.
> 
> 2) In the davmap all responses that do not imply an http content body.
> 
> Currently the only way to set the status code in cocoon is by specifying
> a status-code attribute on the serializer. This means that body-less
> responses can only be programmed using some dummy pipeline as is done in
> the current davmap sample.
> 
> What do other think? Are these convincing use cases for adding
> response.setStatus to the FOM?

I think so, but that doesn't get you much. ;)

Geoff