gin-gonic / contrib

Collection of middlewares created by the community

Home Page:https://gin-gonic.github.io/gin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gzip example not working

chrispassas opened this issue · comments

@javierprovecho
@manucorporat

I've tried using the exact example provided for gzip and found it does not work as intended.

This appears to be related to issue #35

Example in question: https://github.com/gin-gonic/contrib/blob/master/gzip/example/example.go

I get the following output:

curl -v -H "Accept-Encoding: gzip" 'http://localhost:8080/ping'

  • Trying ::1...
  • Connected to localhost (::1) port 8080 (#0)
    GET /ping HTTP/1.1
    Host: localhost:8080
    User-Agent: curl/7.43.0
    Accept: /
    Accept-Encoding: gzip

< HTTP/1.1 200 OK
< Content-Encoding: gzip
< Content-Type: text/plain; charset=utf-8
< Vary: Accept-Encoding
< Date: Mon, 18 Jul 2016 17:20:56 GMT
< Content-Length: 38
<

  • Connection #0 to host localhost left intact
    pong 1468862456?n????

I'm not yet sure how to fix this. I assume the example code needs an update.

Thank you

I found that issue #59 fixeds this. We just need the pull request for #59 to be accepted.