Jim
Greg Stein wrote:
On Tue, Mar 18, 2003 at 04:45:09PM -0800, Justin Erenkrantz wrote:
--On Friday, March 14, 2003 12:50 AM -0800 Jim Carlson <[EMAIL PROTECTED]> wrote:
Howdy, I have a question in the same vein as my last post. Can I rely on ap_get_brigade(mode=AP_MODE_READBYTES, len=X) to return a brigade of length no greater than X? It would appear not, which means I need to be prepared to set aside extra bytes... But I thought this was exactly what the supplying filter was supposed to do! Confirmation requested.
A filter could hypothetically ignore AP_MODE_READBYTES's len parameter and return more. But, none of the current filters in our core do this - they will return at most X bytes. I believe we take the position if a filter returns more than X in this case, it is broken. So, it should be a good assumption to make. -- justin
Yes, it would be considered broken. The higher-level filter knows the boundaries, and how much to ask for (or not). The lower-level filters do not and cannot have the knowledge that the higher/application filters have.
Thus, the rule is that a filter never returns more than asked.
[ there are ways to change that, but it isn't in the architecture now ]
Cheers, -g
