On Wed, 4 Jan 2006, Graham Dumpleton wrote:
Either way, we agree that mod_python.publisher should still output content for HEAD.
Yep.
I would also propose as a change that the req.write() call not cause output to be flushed to allow an output filter like CONTENT_LENGTH to be used.
Hmmm... This needs some more research. i.e. I don't quite completely understand why the CONTENT_LENGTH filter can only count bytes when there is no flush() (shortcoming of CONTENT_LENGTH or an impossibility?)...
Implicit buffering would be a significant change - if someone used req.write() to generate "dynamic" content (e.g. output from one of those traceroute sites being sent in real time), they'd be very surprised to not see the output anymore. CGI I think flushes implicitely at every end of line which where this behaviour comes from...
On the other hand implicit flush slows things down tremenduosly when you have lots of req.write()s, this was discovered when PSP was added and that's when the no-flush argument was introduced, so if backwards compatibility was of no concern, I'd make implicit buffering (i.e. no-flush) default.
I'll add a new JIRA issue for that.
Yep, totally. And thanks for all your help BTW :-) Grisha