in reply to
Re: CGI::Application... flushing output to browser?
in thread CGI::Application... flushing output to browser?
I too face this problem, and tried your hack above.
It works as long as I don't have to use the Authentication plugin. With Authentication plugin, it seems that any irregular mode that is protected by the plugin can never be displayed. Whenever you try to go to that mode, you get the login box, and even if you enter the right credentials, you get to the login box again.
I haven't quite figured out why yet, but I think it's because session state is transmitted by cookies, which themselves are transmitted through http headers. And the specific cookie headers generated by Authentication plugin are not available until AFTER the body has been generatied (the cookie headers are being generated by a postrun hook for some strange reason). In a standard runmode that doesn't matter, because the headers are prepended to the body before the whole thing is outputted. But with an irregular mode, you need to generate and print the headers before you generate and print the body.
Has anybody solved this problem?