cURL / Mailing Lists / curl-library / Single Mail

curl-library

Doing Things with Filters

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 30 Oct 2001 08:18:57 +0100 (MET)

On Tue, 30 Oct 2001, Andrew Francis wrote:

(changed subject since we're now sliding over to filters)

> At one point there was discussion of implementing some sort of "filter"
> system, where the data stream was passed through one or more filters that
> obey a certain interface, before being passed to the callback function.
> So for instance you have something like:
>
> +======+ +=============+ +==========+
> | curl | ---> | gzip filter | ----> | callback |
> +======+ +=============+ +==========+
>
> I think this would also be an ideal way to implement a speed limiter.
>
> Is the 'filter' idea still on the cards?

It certainly is. This has not evolved much, mostly due to my lack of time but
the idea is still valid and something I'd like to see implemented. An initial
very basic and possibly not very correct attempt to structure my thoughts is
found here: http://curl.haxx.se/dev/filter.txt

Ben Greear has a point that this might not be the best way to add a speed
limit feature, as it would need to actually sleep() or something which
shouldn't be considered a filter task. The filters should filter data, no
more, no less. IMO.

> (I'm going to have a lot of spare time starting in a few weeks - I'd love
> to try and implement this myself if noone else wants to :)

I'd love to "hand over" this task to you. I'll be around for questions,
talks, designs and general curl hacking help too of course!

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-30