Re: [users@httpd] Removing an output filter or performing a negative LocationMatch...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux