Stas Bekman wrote:
[EMAIL PROTECTED] wrote:

stas        2003/01/11 18:21:37

  Modified:    src/modules/perl modperl_filter.c
               .        Changes
  Log:
  Request input and output filters are now getting the EOS bucket, which
  wasn't passed through before. Now the context can be flushed on
  EOS.

Doug, since the logic for skipping EOS wasn't explained I've removed it. The reason for always passing EOS to the filter is that so it knows when the context can be flushed. Before that patch it was impossible.

Also notice that the EOS bucket can be a part of a bb with other buckets as well as to be the only one. So there shouldn't be any special handling for this.

This change will possibly break some of the code where people have erroneously relied on the filter to be called once during request time. I'll shortly update the tests and the online docs to show the proper way to handle things.
I've partially restored this functionality and the call to the filter will be skipped only if EOS has been sent already. Which unfortunately will be detected only if the streaming interface is used. I'll commit the solution soonish, together with the implementation of streaming interface for input filters.

The real problem lies in the buggy httpd, which sends the EOS bucket more than once for input filters. I've reported the bug to httpd-dev, but we will have to deal with earlier versions of httpd as well. Also it's always possible that mod_perl will have to interact with other buggy filters, so it's good to have an inhouse protection and always send eos only once.

This protection works only in the streaming interface. Bucket brigades perl filters will have to use their own ctx to remember whether they have passed-through the EOS bucket already. The only solution I can think of for bb filters, is to provide a special interface for sending eos buckets, which will remember whether the eos bucket was already sent in the current context. This will reduce to code clutter, but will make the interface not 1:1 with C API. Of course users will still be able to pass EOS buckets by themselves and then they will have to take care of multiple EOS buckets themselves.

__________________________________________________________________
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]

Reply via email to