[EMAIL PROTECTED] (JR Mayberry) wrote:
>Is it required to, for instance, if you had a 4 chain handler as follows:
>
>ReadCache->Handler->WriteCache->Apache::Compress
>
>for the WriteCache handler to do:  $r->filter_input() and $r->print()
>while <$fh>  even if it doesnt need to?
>
>If I don't do that I seem to be losing all output, when I get to the
>Apache::Compress stage

I'm not actually sure which of two questions you might actually mean. 
If you mean 

 A) Must I call $r->filter_register in each handler?

the answer is yes.  Otherwise the bookkeeping gets off.  If you mean

 B) Must I actually print the input handle to the output filehandle if I 
    don't intend to change the data?

the answer is 'probably'.  

The input needs somehow to be turned to output.  Without doing this,
Apache::Filter can't tell the difference between a handler that doesn't
intend to change the output, and a handler that doesn't intend to send
any output at all.

This discussion suggests that perhaps there ought to be an easy/quick
way for a handler to declare that it doesn't intend to change the
output.  Perhaps a method could be added to Apache::Filter for this, if
it's a common need.

Right now, you could do the following in the no-op handlers:

  $r = $r->filter_register();
  my $fh = $r->filter_input;
  $r->send_fd($fh);

(though I'm not quite sure why these exist as content handlers if
they're no-ops.)


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to