go-bindata-assetfs icon indicating copy to clipboard operation
go-bindata-assetfs copied to clipboard

Gzip headers

Open codekoala opened this issue 9 years ago • 2 comments

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?

codekoala avatar Sep 14 '15 21:09 codekoala

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.

dmitshur avatar Sep 15 '15 01:09 dmitshur

That sounds like exactly what I had in mind. I'll have to take a look at your project. Thanks!

codekoala avatar Sep 15 '15 01:09 codekoala