httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/main http_core.c http_protocol.c util_filter.c
Date Thu, 14 Sep 2000 14:59:38 GMT

Hopefully I have solved this problem with the addition of the pointer to
the filter_rec_t structure.  The ctx pointer really should not be in the
ap_add_filter prototype.

Ryan

> That isn't right. The ctx parameter in the ap_add_filter() is present so
> that the filters can be parameterized. How are we supposed to parameterize
> the filters now?
> 
> Consider the following code:
> 
>   void foobar_insert_filters(request_rec *r)
>   {
>       if (client_uses_WAP(r))
>           ap_add_filter("foobar_rewrite", (void *)FOOBAR_WAP, r);
>       else
>           ap_add_filter("foobar_rewrite", (void *)FOOBAR_HTML, r);
>   }
> 
> We still need to be able to handle the above.
> 
> The AddFilter directive simply uses NULL for the ctx parameter. When Ken was
> discussing the directive, and queried about how to parameterize, that would
> also fit in here.
> 
> That said, I see one of two MUST-DO cases:
> 
> 1) put the ctx parameter back into ap_add_filter()
> 2) have separate notions of filter context (f->ctx) and filter params
>    (f->params). The latter would be passed to ap_add_filter.
>    [ type? no particular thought. at least a string, but the question is how
>      much parsing does the core do. tokenize into words? raw string? ]
> 
> I'm open to either approach.
> 
> Cheers,
> -g
> 
> -- 
> Greg Stein, http://www.lyra.org/
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message