httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject return value of a filter
Date Sat, 26 Aug 2000 19:33:12 GMT
Filters need to be able to detect an error and return an error code so
that prior filters stop processing their input brigades and so that
the content handler stops passing down additional brigade. 

Right now, there is no way that I know of for a filter to indicate an
error:

examples: 
  core filter: can't write to the network because the client closed the
  connection 

  translate filter: input data not in the specified charset 

Filters currently return the number of bytes sent.  I'm not sure how
useful that is, since the prior filter doesn't know if that is good or
bad.  What are cases where it is meaningful?  Maybe a filter should
return the number of its input bytes which it processed (regardless of
how many bytes it had to send to do so)?

I think a filter and thus ap_pass_brigade() should return apr_status_t
and, if appropriate, return APR_SUCCESS (all input bytes processed) or
an APR error code.  An additional filter parameter could be used if
required to tell the caller how many bytes were processed|written.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message