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 Thu, 06 Nov 2003 08:37:39 GMT


> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org] 
> Sent: woensdag 5 november 2003 15:25
> To: dev@cocoon.apache.org
> Subject: Re: [Vote] empty HTTP responses [was Re: Cannot 
> easily set http status]
> 
> 
> 
> On Wednesday, Nov 5, 2003, at 14:20 Europe/Rome, Unico Hommes wrote:
> 
> >> From: Gianugo Rabellino [mailto:gianugo@apache.org]
> 
> >> Sorry to jump in late, I'm probably lagging behind a few 
> posts, but 
> >> was the possibility of having *pipelines* send empty payload 
> >> considered instead? This way flow will always have to 
> sendPage(), but 
> >> the result would be empty content anyway. With the added bonus of 
> >> having the pipeline flexibility to, say, set headers.
> >>
> >
> > But the function of a pipeline is specifically towards the 
> production
> > of
> > an xml response body. To have to set up all the components, 
> execute the
> > pipeline and then fooling the pipeline to send its data to a null 
> > output
> > or refrain from pipeline execution altogether? In some 
> scenarios that
> > may be necessary, for instance in the case of the http HEAD 
> function.
> > The point is, you shouldn't have to, because there are a lot of
> > situations where its just unneccesary overhead. (for example all the
> > dummy responses in the davmap sitemap)
> 
> I'm with Unico here: the use of HTTP in a DeltaV scenario is 
> *massive* 
> and involves tons of requests/responses for even a simple operation 
> like moving a file. Many of these responses have no payload as the 
> result is contained in the response headers.
> 
> Note, this *does not* imply that you shouldn't be able to use a 
> pipeline to do further processing (even if it results in no payload), 
> but I think it should *not* be forced upon us to have a "dummy 
> pipeline" just to satisfy these contraints.
> 
> Different story for Reinhard's concern, I think it's a valid point: 
> most situations on the web handle requests that return a payload... 
> having a way to signal that "hey, you are missing your payload" is a 
> good debugging advice and we wouldn't want to loose this for those 
> "rare" (in comparison) payload-less responses.
> 
> So, what about
> 
>   cocoon.sendEmptyResponse(status-code)
> 
> ?
> 

I am +1 on the idea but would favor naming the method sendStatus
instead, and also have a way to set the status on the environment from
the flow without sending an empty response:

- cocoon.sendStatus(status)
- cocoon.sendStatus(status, message)
- cocoon.response.setStatus(status)
- cocoon.response.setStatus(status,message)

+4 from me


Cheers, Unico

> --
> Stefano.
> 
> 

Mime
View raw message