On Mon, Jun 2, 2008 at 11:50 AM, Ben Davies <[EMAIL PROTECTED]> wrote:
> Sorry, I should have been more explicit:
>
> How would you implement AddOutputFilterByType for filters created with
> ExtFilterDefine?
>
> Example:
>
> I have a flac file. I have a custom filter that converts flac files to mp3
> files. If the request contains the header Accept: audio/mp3, how can I
> ensure that my custom filter will run?
>
> I had a look at the directives for mod_filter and the closest match appears
> to be FilterProvider, but the second argument requires that I specify a
> regular filter.

mod_ext_filter does create "regular" filters that should be usable in
a FilterProvider directive. (Although I have never tried it myself.)

Alternatively, mod_ext_filter has its own set of triggers. For
example, the AddOutputFilterByType directive can be easily replaced by
specifying an intype= argument for your ExtFilterDefine directive. If
you really want to match off the Accept request header (rather than
imitating AddOutputFilterByType as you initially requested), you can
do something like

SetEnvIf Accept audio/mp3 accept-mp3
ExtFilterDefine ... enableenv=accept-mp3

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to