httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject RE: Implementing split() on pipe buckets?
Date Sun, 12 Nov 2000 03:58:08 GMT
> From: []
> Sent: Saturday, November 11, 2000 8:30 PM
> I am against pipes and sockets having a split function.  They don't work
> the same way that the other buckets work, and they really can't.  This
> patch fixes the problem of a pipe split where there is enough data in the
> pipe to split at the desired length, because it splits the pipe into a
> heap and a pipe bucket at the correct place.  What if there isn't enough
> data to do the split at the correct place?  This patch doesn't handle that
> case.  All the other bucket types return an error if the split is past the
> end of the bucket.

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.
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.  

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.
Let the few do the working around, let the masses have clean code.  Or, in
other words, the benefit of the many outweights the benefit to the few, or
the none :-)

View raw message