On Tuesday 04 July 2006 19:41, Nick Kew wrote:
> On Tuesday 04 July 2006 14:42, Neil A. Hillard wrote:
> > There isn't a negative version of LocationMatch so I've been trying
> > negative lookaheads but I can't find a suitable one.  I can't use:
> >
> > <LocationMatch "aa\.bb\.cc\.(?!detailedNavigationTree)$">
> >  SetOutputFilter proxy-html
> > </LocationMatch>
>
> Without thinking about LocationMatch, how about the mod_deflate hack
> of a "don't use me" environment variable?  You can add it to the
> check_filter_init function (line 768), and set the env var in a
> simple <Location>.
>
> I know you have a compiler :-)

OK, for the benefit of anyone else who wants it, here's a patch that'll
let you disable it with
        SetEnv  proxy-html      Off
or equivalent.

--- mod_proxy_html.c    (revision 50)
+++ mod_proxy_html.c    (working copy)
@@ -775,6 +775,11 @@
   } else if ( strncasecmp(f->r->content_type, "text/html", 9) &&
         strncasecmp(f->r->content_type, "application/xhtml+xml", 21) ) {
     errmsg = "Non-HTML content; not inserting proxy-html filter" ;
+  } else {
+    const char* env_cfg = apr_table_get(f->r->subprocess_env, "proxy-html") ;
+    if (env_cfg && !strcasecmp(env_cfg, "off")) {
+      errmsg = "proxy-html filter disabled by configuration" ;
+    }
   }

   if ( errmsg ) {

-- 
Nick Kew

---------------------------------------------------------------------
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