From a66f32ea580118e7cc8b3c3bd92c0d7ab90e711f Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Tue, 19 Sep 2017 09:14:23 -0500 Subject: [PATCH] always gzip --- command/agent/http.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/agent/http.go b/command/agent/http.go index 8244f2328..79641f0ba 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -95,7 +95,12 @@ func NewHTTPServer(agent *Agent, config *Config) (*HTTPServer, error) { srv.registerHandlers(config.EnableDebug) // Handle requests with gzip compression - go http.Serve(ln, gziphandler.GzipHandler(mux)) + gzip, err := gziphandler.GzipHandlerWithOpts(gziphandler.MinSize(0)) + if err != nil { + return nil, err + } + + go http.Serve(ln, gzip(mux)) return srv, nil }