Version: v1.2.3
Codename: morbier
Go version: go1.7.5
Built: 2017-04-13_07:21:10PM
OS/Arch: linux/amd64
{
"GraceTimeOut": 10,
"Debug": false,
"CheckNewVersion": true,
"AccessLogsFile": "",
"TraefikLogsFile": "/var/log/traefik/daemon.log",
"LogLevel": "INFO",
"EntryPoints": {
"http": {
"Network": "",
"Address": ":80",
"TLS": null,
"Redirect": {
"EntryPoint": "https",
"Regex": "",
"Replacement": ""
},
"Auth": null,
"Compress": false
},
"https": {
"Network": "",
"Address": ":443",
"TLS": {
"MinVersion": "",
"CipherSuites": null,
"Certificates": null,
"ClientCAFiles": null
},
"Redirect": null,
"Auth": null,
"Compress": true
}
},
"Cluster": null,
"Constraints": [],
"ACME": {
"Email": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Domains": null,
"Storage": "/var/lib/traefik/acme.json",
"StorageFile": "",
"OnDemand": true,
"OnHostRule": false,
"CAServer": "",
"EntryPoint": "https",
"DNSProvider": "",
"DelayDontCheckDNS": 0,
"ACMELogging": false,
"TLSConfig": null
},
"DefaultEntryPoints": [
"http",
"https"
],
"ProvidersThrottleDuration": 2000000000,
"MaxIdleConnsPerHost": 200,
"InsecureSkipVerify": false,
"Retry": null,
"Docker": null,
"File": {
"Watch": true,
"Filename": "",
"Constraints": null
},
"Web": {
"Address": ":8081",
"CertFile": "",
"KeyFile": "",
"ReadOnly": true,
"Statistics": {
"RecentErrors": 10
},
"Metrics": null,
"Auth": null
},
"Marathon": null,
"Consul": null,
"ConsulCatalog": null,
"Etcd": null,
"Zookeeper": null,
"Boltdb": null,
"Kubernetes": null,
"Mesos": null,
"Eureka": null,
"ECS": null,
"Rancher": null,
"ConfigFile": "/etc/traefik/traefik.toml"
}
Enabled compress = true on an EntryPoint.
I have two backends, one serving gzipped content (with the correct "Content-Encoding: gzip" header), the other serving uncompressed content. Before enabling compression in Traefik, the content from both backends is proxied as is.
I expect the content to be compressed only if it isn't already compressed (as indicated by the backend).
After enabling compression in the entrypoint all content is indeed gzipped, even if it was already compressed by the backend. In other words it is double-compressed. The browser then decompresses it once, outputting the resulting binary data as if it is text, i.e. unreadable.
I believe this was reported on Slack as well.
I opened a PR in NYTimes/gziphandler which I believe would fix this issue.
I just realized that this is a duplicate of #1060, so closing.
Please follow up any discussions on the original issue.
Most helpful comment
I opened a PR in NYTimes/gziphandler which I believe would fix this issue.