Ilya Kasnacheev wrote (2008-03-12 12:18):
В сообщении от 12 Март 2008 12:07 Mattias Jiderhamn написал(a):
What about my anonymous wrapper? See reply to original post.
It may work if you are certain there will be no flushing to the client
before a forward().
Nope, there would be a lot of flushing before forward().
Because, forward() final destination isn't going to print page from
scratch. Instead it is going to print a fragment of page to be
include()d. After it will return, the rest of page() will be printed.
Also, there can be quite a few such (include() -> forward() -> forward()
-> print()) sessions.
What I meant was whether there will under any circumstances be a forward
on the original - non-dispatched - request. (Such as displaying an error
page if an error occurs deep within the include hierarchy)
There would not be a forward on the original request, EXCEPT if there is an error page.

Then again, throwing a lot of InvalidState errors because error occured after buffer was committed is, IMHO, seriously *not smart* move.
At least it is predictable. Sending new HTTP headers in the middle of the response may in theory be interpreted differently by different clients.

resin-interest mailing list

Reply via email to