gzip icon indicating copy to clipboard operation
gzip copied to clipboard

Martini handler for adding gzip compress to requests

Results 9 gzip issues
Sort by recently updated
recently updated
newest added

It turns out that deleting Content-Length header field at the end of serveGzip function may not be enough for gzip. According to the spec of compress/gzip, a Write() call may...

Hi, Has anyone tried to use gzipping and martini in a reverse proxy configuration? I.e I have two servers A and B where A acts as a proxy to B...

Gzip response writer still sets the gzip header on empty responses if the client indicates that it can accept a response. The gzip writer should set headers and only attempt...

I've noticed this on my machine, using the example in the README ``` func main() { m := martini.Classic() // gzip every request m.Use(gzip.All()) m.Run() } ``` All requests _after_...

So when using this it constantly results in my browser downloading a gzipped file. I also get a panic from Martini saying the following: ``` [martini] PANIC: interface conversion: *martini.responseWriter...

Consider using a buffer for the response and only doing the GZIP compression at the end when the amount of bytes to be written exceeds a threshold. See: http://webmasters.stackexchange.com/questions/31750/what-is-recommended-minimum-object-size-for-gzip-performance-benefits

``` go package main import ( "github.com/go-martini/martini" "github.com/martini-contrib/gzip" ) func main() { m := martini.Classic() m.Use(gzip.All()) addRouter(m) m.RunOnAddr("0.0.0.0:8089") } func addRouter(m *martini.ClassicMartini) { m.Get("/:name", show) } func show(params martini.Params) (int,...

If there is a server side error GZip returns a file to the browser named latest, and does not display an error in the browser. If you turn Gzip off...