Re: Feedback about the content processing framework

From: Robert Collins <robert.collins@dont-contact.us>
Date: Wed, 31 Jan 2001 20:58:15 +1100

----- Original Message -----
From: "Moez Mahfoudh" <moez.mahfoudh@imag.fr>
To: "Robert Collins" <robert.collins@itdomain.com.au>; "Squid Dev" <squid-dev@squid-cache.org>
Sent: Wednesday, January 31, 2001 8:53 PM
Subject: Re: Feedback about the content processing framework

> Robert Collins wrote:
>
> > Nearly forgot a point...
> >
> > ----- Original Message -----
> > From: "Robert Collins" <robert.collins@itdomain.com.au>
> > To: "Moez Mahfoudh" <moez.mahfoudh@imag.fr>; "Squid Dev" <squid-dev@squid-cache.org>
> > Sent: Wednesday, January 31, 2001 8:39 PM
> > Subject: Re: Feedback about the content processing framework
> >
> > >
> > >
> > > At the moment, the API rule is that the first buffer will always be the headers, with no body.
> > > There is a flag FILTER_EOF which matches your CP_LAST_CHUNK.
> > >
> >
> > Currently:
> > A filter MUST NOT call the next filter with buf=NULL, len=0 except when it has reached EOF.
> > A filter MUST call the next filter with buf=NULL len=0 when it has reached EOF (ie after flushing it's buffers).
>
> I've written a dummy filter which only act as a spy and dumps the len and the flags before sending buf unchanged to the next
> filter on the chain. All I notice is that there is a call to filter for the headers, then there are one or many calls to the
> filter, but flags is still always 0 and there is no way to distinguish the last chunk....
>
> --Moez
>

Currently: The last chunk has len==0, buf==NULL. The flag is defined, but not used all over yet.
store a state variable for headers seen, and test for EOF/LASTCHUNK by buf==NULL || flags & FILTER_EOF. That'll cover both bases
until I've finished the tidyup.

Regarding the request/reply question, I've just checked and there is no way for you to take my suggestion :-/

I'll update the API for the makestate function and email the list when I've done that.

The reason I don't want to alter the filter API is because the filters are currently generic (as I mentioned :-])

Rob
Received on Wed Jan 31 2001 - 02:57:37 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:26 MST