private static void addNoCacheFilter(ServletContextHandler ctxt, Configuration conf) {
    if (conf.getBoolean(HTTP_UI_NO_CACHE_ENABLE_KEY, false)) {
      Map<String, String> filterConfig =
        AuthenticationFilterInitializer.getFilterConfigMap(conf, "hbase.http.filter.");
      defineFilter(ctxt, NO_CACHE_FILTER, NoCacheFilter.class.getName(), filterConfig,
        new String[] { "/*" });
    } else {
      defineFilter(ctxt, NO_CACHE_FILTER, NoCacheFilter.class.getName(),
        Collections.<String, String> emptyMap(), new String[] { "/*" });
    }
  }
Construct and configure an instance of {@link GzipHandler}. With complex
multi-{@link WebAppContext} configurations, it's easiest to apply this handler directly to the
instance of {@link Server} near the end of its configuration, something like

<pre>
Server server = new Server();
// ...
server.setHandler(buildGzipHandler(server.getHandler()));
server.start();
</pre>
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java