Bill Marrs wrote:
At 04:24 AM 7/15/2003, Stas Bekman wrote:
Philippe M. Chiasson wrote:
On Thu, 2003-07-03 at 01:24, Bill Marrs wrote:
This fixed the bug for me.
Great! Will commit it in the near future. (Can't seem to access the cvs
server right now, crappy internet cafe)
-1, this is a wrong solution. print ; should flush just like it did
in mod_perl 1.0 if $| == 1; Consider this script:
print Content-type: text/plain\n\n;
local $| = 0;
print start\n\n;
local $| = 1;
print ;
sleep 5;
local $| = 0;
print end\n;
print , must immediately flush the buffered data, since $| has
changed from 0 to 1.
This may be naive, but might it not flush the output buffer at the 4th
line (local $| = 1;)? ...or does the flush only happen when print is
called. Having to call print seems cumbersome to do a flush, but
maybe that's just the way Perl works?
There is $r-rflush for this purpose. This is not a perl API, but Apache API.
You can also use IO::File or other IO packages that extend perl to provide
this kind of API.
But this is how perl works, so we have to preserve it under mod_perl.
One thing that could help is if someone could take the time to write a
test for this bug.
Unfortunately I don't seem to be able to reproduce the problem, so I
can't debug the problem. It could be a bug on the mod_deflate's behalf
as well. Philippe, were you able to reproduce the problem with Bill's
setup? I was writing a test, but couldn't get it to fail... may be
because i was using 2.0.47. Bill, do you have the problem with the
latest apache version?
Did you see my note in the original post about this working fine under
mod_cgi, but causing the 20014:Error only under mod_perl? This seemed
to point the finger squarely at mod_perl.
If I was able to reproduce it I could tell, but I don't seem to.
I could upgrade to 2.0.47, but it seems unlikely that it would fix
this. Are you sure you're running a mod_perl without Philippe's fix (in
Apache__RequestIO.h), I assumed he eventually checked it in.
No, Philippe hasn't committed it, neither I have used it. If you can test with
2.9.47 that will help. Otherwise I'll later try with .46 as well.
Also Bill, why do you have this setup:
Location /perl
AddOutputFilterByType DEFLATE text/*
SetOutputFilter DEFLATE
/Location
why adding it twice? You need only the latter inside Location, or
alternatively only the former outside Location if you want it to be
set globally:
http://httpd.apache.org/docs-2.0/mod/core.html#addoutputfilterbytype
Ah, I misunderstood the mod_deflate docs. I think at the time, it
didn't seem to work with just one of them in-place, so I added the
other. *SHRUG* I can't say I'm a pro at Apache config files, I just
tinker until it works. I assume this is irrelevant to the bug, though.
I'm not sure if your config doesn't insert the filter twice. Need to check
whether SetOutputFilter overrides AddOutputFilterByType as well.
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com