cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: [Vote] empty HTTP responses [was Re: Cannot easily set http status]
Date Wed, 05 Nov 2003 13:26:43 GMT
 

> 
> -----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.

I've checked with Rhino. Null can indeed be used to discriminate between the situation where
you return nothing at all as in that case an Undefined object is returned to the interpreter.


-- Unico

> -Bertrand
> 
> 
> 

Mime
View raw message