Serving gzipped content for Go

后端 未结 4 2063
死守一世寂寞
死守一世寂寞 2021-01-30 17:00

I\'m starting to write server-side applications in Go. I\'d like to use the Accept-Encoding request header to determine whether to compress the response entity usi

4条回答
  •  太阳男子
    2021-01-30 17:20

    There is no “out of the box” support for gzip-compressed HTTP responses yet. But adding it is pretty trivial. Have a look at

    https://gist.github.com/the42/1956518

    also

    https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/cgUp8_ATNtc

提交回复
热议问题