Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 25539 invoked by uid 500); 29 Nov 2001 23:03:41 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 25524 invoked from network); 29 Nov 2001 23:03:40 -0000 Message-ID: <025201c1792a$467cb5d0$a5381b09@sashimi> From: "Bill Stoddard" To: , References: <000f01c1791d$cc485730$3d01a8c0@spidercache.com> Subject: Re: Request for Patch to 1.3.x Date: Thu, 29 Nov 2001 18:04:56 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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" To: "'Greg Stein'" ; 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/ >