httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: Request for Patch to 1.3.x
Date Thu, 29 Nov 2001 23:04:56 GMT
It's kinda crufty, but so are a lot of other things in 1.3. It is a small patch which is
goodness and I appreciate what it is used for.

If it is useful enough for you to be still interested in it after a month, I'll add my +1
to Gregs :-)

+1

Bill

----- Original Message -----
From: "Kevin Mallory" <kmallory@spidercache.com>
To: "'Greg Stein'" <gstein@lyra.org>; <dev@httpd.apache.org>
Sent: Thursday, November 29, 2001 4:35 PM
Subject: RE: Request for Patch to 1.3.x


> Does anyone have any objections to adding this capability??
>
> -----Original Message-----
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Sunday, October 28, 2001 10:28 PM
> To: dev@httpd.apache.org
> Cc: Kevin Mallory
> Subject: Re: Request for Patch to 1.3.x
>
>
> On Wed, Oct 03, 2001 at 11:19:34AM -0700, Kevin Mallory wrote:
> >...
>
> [ patch allows custom caching mechanisms ]
>
> >...
> > The patch simply adds a new callback (the 'filter callback') into the
>
> >handling in buff.c's routine writev_it_all() and buff_write().
> >
> > When not registered, there is no performance impact to users. This
> > filter callback makes it possible for SpiderCache to correctly
> > intercept the request as it is being processed, thus allowing our
> > product to perform dynamic page caching.
>
> +1 on including this patch.
>
> I see no bad effects, and it has definite utility.
>
> Cheers,
> -g
>
>
> >...
> > *** orig_buff.c Tue Aug 21 17:45:34 2001
> > --- spidercache_buff.c Tue Aug 21 17:45:35 2001
> > ***************
> > *** 356,361 ****
> > --- 356,365 ----
> >   {
> >       int rv;
> >
> > +     if (fb->filter_callback != NULL) {
> > +         fb->filter_callback(fb, buf, nbyte);
> > +     }
> > +
> >   #if defined(WIN32) || defined(NETWARE)
> >       if (fb->flags & B_SOCKET) {
> >   rv = sendwithtimeout(fb->fd, buf, nbyte, 0);
> > ***************
> > *** 438,443 ****
> > --- 442,450 ----
> >          (size_t) SF_UNBOUND, 1, SF_WRITE);
> >   #endif
> >
> > +     fb->callback_data = NULL;
> > +     fb->filter_callback = NULL;
> > +
> >       return fb;
> >   }
> >
> > ***************
> > *** 1077,1082 ****
> > --- 1084,1095 ----
> >   static int writev_it_all(BUFF *fb, struct iovec *vec, int nvec)
> >   {
> >       int i, rv;
> > +
> > +     if (fb->filter_callback != NULL) {
> > +         for (i = 0; i < nvec; i++) {
> > +             fb->filter_callback(fb, vec[i].iov_base,
> vec[i].iov_len);
> > +         }
> > +     }
> >
> >       /* while it's nice an easy to build the vector and crud, it's
> painful
> >        * to deal with a partial writev()
>
>
> > *** orig_buff.h Tue Aug 21 17:45:34 2001
> > --- spidercache_buff.h Tue Aug 21 17:45:35 2001
> > ***************
> > *** 129,134 ****
> > --- 129,138 ----
> >       Sfio_t *sf_in;
> >       Sfio_t *sf_out;
> >   #endif
> > +
> > +     void *callback_data;
> > +     void (*filter_callback)(BUFF *, const void *, int );
> > +
> >   };
> >
> >   #ifdef B_SFIO
>
>
> --
> Greg Stein, http://www.lyra.org/
>


Mime
View raw message