httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject RE: return value of a filter
Date Mon, 28 Aug 2000 15:50:08 GMT
> From: Greg Stein []
> Sent: Sunday, August 27, 2000 5:37 AM
> On Sat, Aug 26, 2000 at 03:33:12PM -0400, Jeff Trawick wrote:
> >...
> > 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.
> +1 on using apr_status_t.

+1 here too, this is the more common syntax of error-checked funcs.
(Well, excluding errno, which is not our model.)  We need to indirect
no matter what, so I'd rather see the size indirected.

> The number of bytes sent is (as you point out) rather bogus.  "sent" is a
> meaningless concept from the (theoretical) filter chain standpoint. The
> "consumed" notion is nice, but the design point is simply: I consumed the
> whole darn brigade. Byte counts are moot -- the caller is certainly not
> going to do anything with them. 

> -0 on any kind of "out of band" query facility w.r.t bytes 
> process/written.

For emulation alone, this information is valuable.  Yes, maybe we don't 
expect the caller to retry, but this is still useful imho.

View raw message