Matthew Bernstein wrote:
> I've been having an ongoing problem with mod_perl under NT for a while
> now (different mp2 builds, different apache builds, different perl builds).
>
> I'm using a PerlOutputFilterHandler which is filtering the output of a
> perl-script.
>
> If the output of the script is sufficient (this varies, but ~6k), then
> the POFH receives a complete environment.
>
> Otherwise, the environment consists only of MOD_PERL, PATH and
> GATEWAY_INTERFACE (a bit like PerlOptions -SetupEnv). The script seems
> to always get everything.
>
> Anything I can try? I've been trying to debug the problem, but I feel
> like I'm looking for a needle in a haystack given I'm totally unfamiliar
> with the modperl source.
This is a global issue, not particular to NT. What happens is that the
env behavior for filters is not defined. You observe the following:
when you send a response with a little data it gets buffered first, the
response handler finishes and then the output filter is called. When the
handler is finished it resets the environment, and therefore the filter
doesn't see it.
when you send a response with more data than fits into the buffer, the
output filter is getting called on the first buffer while you are still
inside the response handler. therefore the filter sees the extended env,
but the last buffer won't see it anymore (unless flushed), because the
handler will finish before it's flushed.
You can observe the same behavior by forcing flush:
$r->print("x");
$r->rflush;
$r->print("x");
The following section should make things more clear:
http://perl.apache.org/docs/2.0/user/handlers/handlers.html#All_in_One_Filter
Now this doesn't solve your problem. You want the env to be set in
filters. We need to spec how this should work first. Doug?
My initial thought is that it's going to be very expensive to set the
env (like we do for mod_perl handlers) every time a filter is called.
__________________________________________________________________
Stas Bekman JAm_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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]