         (.setLogLatency true)))))
 
 (defn get-gzip-handler
-  [existing-handler]
+  "Setup gzip compression for responses.  Compression will be used for any response larger than
+  the configured minimum size."
+  [existing-handler min_gzip_size]
   (doto (GzipHandler.)
     (.setHandler existing-handler)
-    (.setMinGzipSize MIN_GZIP_SIZE)))
+    (.setMinGzipSize min_gzip_size)))
 
 (defrecord WebServer
   [

  860)

(defn get-access-log-handler
  [existing-handler]
  (doto (RequestLogHandler.)
    (.setHandler existing-handler)


        (let [handler
              (when use-compression?
                (get-gzip-handler (get-access-log-handler (.getHandler server)) MIN_GZIP_SIZE)
                (get-access-log-handler (.getHandler server)))]
          (doto server
            (.stop)
