mr.nick has asked for the wisdom of the Perl Monks concerning the following question:
I have a CGI script that bounces back a binary file that is many megabytes in size. The script outputs the HTTP headers (complete with mimetype and Content-Disposition: filename=) and then sends the data.
Under Apache 1.3.x, I could put a simple $|=1 at the top of my code and all would work as expected. Under Apache 2.0x, this doesn't work. The entire file must come down the pipe first before you get prompted as to how to handle the it.
Apache 2.0 is buffering my output somehow (or forcing my Perl script back to $|=0).
Is anyone aware of an Apache::* module (or other) that I could potentionally use to bypass this? I presume that the CGI handler for Apache 2.0 is automatically buffering the results, regardless of what the actual script itself is doing. I'm hoping there exists something that bypasses the CGI handler is some way.
Hm. mod_perl perhaps. Except I didn't have luck getting it to work with Apache 2.0 (which, ugh, I must use) last time I tried.
Suggestions? Comments? Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Output buffering under Apache
by bastard (Hermit) on Mar 01, 2001 at 20:30 UTC | |
by mr.nick (Chaplain) on Mar 01, 2001 at 21:16 UTC | |
by bastard (Hermit) on Mar 01, 2001 at 22:41 UTC |