go-bindata-assetfs
go-bindata-assetfs copied to clipboard
Gzip headers
It would be neat to check an HTTP request for Accept-Encoding: gzip
to return assets with a Content-Encoding: gzip
header and the compressed asset body.
Is there already a way to do this that I've missed?
Are you asking about using the original compressed content directly, rather than decompressing and then compressing it again?
If so, this would have to be supported by go-bindata
first, since go-bindata-assetfs
uses output generated by go-bindata
. There's an open issue about it at https://github.com/jteeuwen/go-bindata/issues/22.
I really wanted this feature too, and I ended up making a fork based on go-bindata
and go-bindata-assetfs
, combining the two packages into a single one. That allowed this feature to be implemented more directly.
That sounds like exactly what I had in mind. I'll have to take a look at your project. Thanks!