httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Implementing split() on pipe buckets?
Date Sun, 12 Nov 2000 04:26:21 GMT

> I agree with you that duplicate can't work on a pipe or socket, but I really
> disagree here.  We discussed at the filtering meeting that there are several
> key operations that must -always- be implemented, and -always- work.  These
> would be create, destroy, read and split.  Anything else is negotiable.

No, at the filter meeting, the only functions that we said would always
work are create and read.  Everything is negotiable.  In this case, a
split on a pipe or socket just can't be done cleanly.  I explained why in
another message just now.

> The question on the table should be how to split a pipe or socket, and if it
> must be a read/split, then so be it.  

There is NO way to do a clean split on a pipe or socket.  There are just
too many edge cases that would need to be taken care of.  The only place
that these issues can be cleanly handled is in the program.

> The rule is simple, a filter can never trust it knows every kind of bucket
> that is thrown it's way, so it must have an API to retrieve the methods
> available, and the methods -preferred-.  e.g. read is better than split
> from one sort of pipe, duplicate is bad from another.  If the module author
> wishes to optimize, give them the info, don't keep throwing a ton of special
> rules and restrictions that every filter author is required to work around.

What special ton of special rules?  There is a small set of rules:

Every bucket MUST implement read and create

If a bucket has a -1 length, then the length is undeterminable.

Bucket functions should feel free to return APR_ENOTIMPL, which means the
program should fall back to some other method.

Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message