httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject updated mod_gargle? not really... (was: [PATCH] revised, final filtering patch. (ready for review))
Date Mon, 03 Jul 2000 23:50:36 GMT
On Mon, Jul 03, 2000 at 08:48:24AM -0400, Jeff Trawick wrote:
> Greg:
> Do you have a revised mod_gargle.c to go with this latest patch?

Only for the header/footer part. The other two depended on the char*
handler. With the removal of that functionality, I must now go and duplicate
the whole char* functionality inside the functions. (well, develop some
utility functions)

Until I get those utilities done, which allows my handlers to look at the
bytes of the content (given arbitrary buckets), then the two old examples
are hopelessly broken/impossible.

Here is the header/footer function now:

static void gargle_bucket(ap_filter_t *filter, ap_bucket_t *bucket)
    gargle_ctx *ctx = filter->ctx;
    if (bucket->type == AP_BUCKET_EOS) {
        ap_fc_puts(filter, "Here is the gargle footer!");
    else if (ctx->position == 0) {
        ap_fc_puts(filter, "Here is the gargle header!");
        ctx->position = 1;

    ap_fc_putbucket(filter, bucket);

Note that it would also be possible to create new buckets for the strings
and hook them into a chain for delivery down the pipe. I chose to use the
simpler route of ac_fc_puts().


Greg Stein,

View raw message