Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Minimal example for double gzip by gorilla/handlers.CompressHandler

The CompressHandler of gorilla/handlers gzips responses twice if they're already gzipped, i.e. it ignores the Content-Encoding header.

How to reproduce

Requirements:

  • go 1.12+
$ go run main.go &
$ curl -H 'Accept-Encoding: gzip' localhost:9999 | gunzip
# prints garbage
$ curl -H 'Accept-Encoding: gzip' localhost:9999 | gunzip | gunzip
# works fine

A working implementation is served on localhost:19999.

About

This is a minimal working example to demonstrate the gorilla/handlers.CompressHandlers gzips twice.

Resources

License

Releases

No releases published

Packages

No packages published

Languages