Re: Inline content modification?

From: Joe Cooper <joe@dont-contact.us>
Date: Tue, 16 Jan 2001 22:05:07 -0600

Great to hear it Robert. Sounds like you've got better plans than I.
;-) I'll fetch that from CVS and see what I can figure from it.
Hopefully, I'll be able to piece together something workable. If I
can't manage it relatively quickly, I'll probably backport Olaf's stuff
to our 2.2S5 Squid (which should be easier than forward porting to 2.4
since so much has changed since then) until I can figure out the Right
Way to do things based on your code.

Thanks for the tips, and for taking the initiative to get some filter
code written.

Robert Collins wrote:

> Joe, I think this code may still be slightly broken for what you
> want to do - however it should make a good reference point. I'm
> avoiding dlopened libraries until I have time to learn the
> peculiarities of portable dlopens across MS Visual C & gcc/cygwin.
> Also beware the new authentication code: it won't fit with
> auth_rewrite (I did look at it).
>
> However I've followed up an idea I had, and built a (rather
> primitive) data filter that uses a pipe conecpt rather than a loop
> of called once filters (as both the original TE code, and Olaf's
> filtering code does).
>
> It's somewhat easier to use because you can consider the next filter
> in the chain to be a write(buf,len) function, allowing a bunch of
> malloc's & special cases to be avoided.
>
> If you want to play with it, it's tagged rbcollins_filters on
> sourceforge.
>
> BTW: client_side is good for filtering too - I was pointing out that
> for a accelerator that alters every request with those URL's, server
> sided is more efficient. For altering based on
> username/client-agent or a number of other things, client_side is
> more efficient. What I'm building hooks filters in at four
> different locations: incoming data request & response, outgoing
> data request & response.
>
> 'Course it's 100% up to you whether to modify the response for the
> whole server or each client :-]
>
> here are my metnal examples for places to hook things: virus
> scanning - incoming responses content translation - outgoing
> responses on the fly Content-Encoding - outgoing responses
> (compression) and incoming responses (store canonical) pattern
> blocking - incoming responses & outgoing requests (Ie block
> httptunnel & the irc via CONNECT stuff)
>
> Rob
Received on Tue Jan 16 2001 - 20:57:14 MST

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