cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [Vote] empty HTTP responses [was Re: Cannot easily set http status]
Date Wed, 05 Nov 2003 14:11:43 GMT
Unico Hommes wrote:

> 
>
>  
>
>>-----Original Message-----
>>From: Bertrand Delacretaz [mailto:bdelacretaz@apache.org] 
>>Sent: woensdag 5 november 2003 13:55
>>To: dev@cocoon.apache.org
>>
>>Le Mercredi, 5 nov 2003, à 13:11 Europe/Zurich, Reinhard 
>>Poetz a écrit :
>>    
>>
>>>...I'm +1 with the idea to send pages without payload but -0 with flowscripts
which terminate without calling sendPage*. I would prefer an explicit way....
>>>      
>>>
>>Same here: flowscripts should not hide the fact that a response is indeed sent.
>>
>>    
>>
>
>I suggested on the other thread that we could use "return null" as a signal for that.
>
>function put() {
>  doput();
>  setStatus(201);
>  return null;
>}
>
>Null would mean a pipeline is not required to be executed.
>
>  
>

-1 : we must have an explicit call to an environment-related method that 
allows to detect if the application tries to send content back 
afterwards. And this should not be available only in the flow as we may 
want to do the same in an action.

That's why I proposed a redirect to a special "null" pseudo-protocol, as 
once a redirect has been set the sitemap engine stops further processing 
(unless it's a "cocoon:" redirect). But this may not be the cleanest way 
and we may better use a method on the response object. And if 
sendStatus() and sendError() don't fit, let's do our own 
sendEmptyResponse(int status, String message).

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message