Vadim Gritsenko pisze:
Grzegorz Kossakowski wrote:
Vadim Gritsenko napisaĆ(a):
For pipelines consisting of only generators, transformers and
serializers it's really easy to implement (I have a patch for it
already done). However, how do you see it could be implemented
*automatically* for actions and flowscripts?
IIRC, tree processor can happily build a pipeline even if there are
actions in the sitemap - so that is not a problem.
I don't get these. Action has only one method act() where e.g. database operations and status code can be mixed. If we call act() during
processing of HEAD request we will have side effects (db operations) otherwise we will not have a proper value of status code that we are
supposed to return in response to the HEAD request.
The only option I see is handling HEAD request inside act() by author of action but this we can't call it an automatic handling of HEAD
requests for actions ;)
A bit different with the flowscript. In case of a flowscript, tree
processor result will be one of:
* empty response with status code
* internal redirect
* redirect
In case of internal redirect you'd have to follow it to build the actual
pipeline.
Right, but what about other operations performed in flowscript? Flowscript would have to be written in conditional manner so it does not
perform any operations while handling HEAD request right?
It's the same as for actions, there is no automation here. May it be that you
have other idea?
I don't see any connection of the above with unbuffered output?
I was referring to the error page when LOCK is called.
You probably missed the point in the first paragraph you quoted. That's
what I said -- Cocoon should handle HEAD requests, automatically, for
external HEAD requests.
However, that should not be done in the context of services *creating
internal* HEAD requests while original HTTP request was something
different -- that would break any program, even specifically written for
such quirks. This is described in 2nd and 3rd paragraph you quoted.
Yes, I missed your point. If we don't use internal HEAD requests the only
option is Daniel proposal (hack).
What is this solution?
See: http://article.gmane.org/gmane.text.xml.cocoon.devel/73261
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/