Hi Randal,
The "Lines 1 through 3 begin nearly every CGI program I write: enabling taint checking, compiler restrictions, and disabling the buffering of standard output." in your article doesn't hold true any more for Apache 2. Specifically the "$|++;" which does disable the buffering at the perl level but not within Apache v2. :(
The method to use now is forking the process in the background and providing updates. Roy Johnson provides the link to the redirection discussion.
Update: I remembered my tests wrong. My apologies to Merlyn.
Jason L. Froebe
Team Sybase member No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
| [reply] |
The "Lines 1 through 3 begin nearly every CGI program I write: enabling taint checking, compiler restrictions, and disabling the buffering of standard output." in your article doesn't hold true any more for Apache 2. Specifically the "$|++;" which does disable the buffering at the perl level but not within Apache v2. :(
Uh, you're apparently confused. I'm unbuffering the connection between the forked Perl process and Apache. That doesn't matter whether it's Apache 1 or Apache 2. That's to keep unbuffered and buffered output from intermixing badly to STDOUT, so that the header doesn't appear after some of the body content, for example.
The method to use now is forking the process in the background and providing updates. Roy Johnson provides the link to the redirection discussion.
And the technique shown is indeed "fork and continue the process in the background". Did you read the article?
| [reply] |
Hi Randal,
Actually I did many times both on the web and also in the book. Anyways, I didn't explain myself clearly enough. Sorry about that. With Apache 2, the unbuffering at the perl level doesn't seem to make any difference (atleast with my testing).
update: nevermind. I remembered my test wrong. ugh.. must be too close to monday
Jason L. Froebe
Team Sybase member No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
| [reply] |