{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaWeb/GnuTLS.jl/issues/27","labels_url":"https://api.github.com/repos/JuliaWeb/GnuTLS.jl/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/JuliaWeb/GnuTLS.jl/issues/27/comments","events_url":"https://api.github.com/repos/JuliaWeb/GnuTLS.jl/issues/27/events","html_url":"https://github.com/JuliaWeb/GnuTLS.jl/issues/27","id":53945934,"number":27,"title":"gzipped data is coming through funny","user":{"login":"jkroso","id":1103796,"avatar_url":"https://avatars.githubusercontent.com/u/1103796?v=3","gravatar_id":"","url":"https://api.github.com/users/jkroso","html_url":"https://github.com/jkroso","followers_url":"https://api.github.com/users/jkroso/followers","following_url":"https://api.github.com/users/jkroso/following{/other_user}","gists_url":"https://api.github.com/users/jkroso/gists{/gist_id}","starred_url":"https://api.github.com/users/jkroso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkroso/subscriptions","organizations_url":"https://api.github.com/users/jkroso/orgs","repos_url":"https://api.github.com/users/jkroso/repos","events_url":"https://api.github.com/users/jkroso/events{/privacy}","received_events_url":"https://api.github.com/users/jkroso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-10T05:07:18Z","updated_at":"2015-03-16T15:48:03Z","closed_at":null,"body":"I would expect the following script to have the same output as `curl -H \"Accept-Encoding: gzip\" https://api.github.com:443/repos/JuliaWeb/GnuTLS.jl/git/refs/heads/master`. But it seems to be quite different. They have a similar length 184 bytes vs 189 but otherwise completely different. If I remove the \"Accept-Encoding: gzip\" header the results match up.\r\n\r\n```julia\r\nusing GnuTLS\r\n\r\nsess = GnuTLS.Session()\r\nset_priority_string!(sess)\r\nset_credentials!(sess, GnuTLS.CertificateStore())\r\nassociate_stream(sess, connect(\"api.github.com\", 443))\r\nhandshake!(sess)\r\nwrite(sess, \"\"\"GET /repos/JuliaWeb/GnuTLS.jl/git/refs/heads/master HTTP/1.1\\r\r\nUser-Agent: Julia/$VERSION\\r\r\nHost: api.github.com\\r\r\nAccept: */*\\r\r\nAccept-Encoding: gzip\\r\r\n\\r\r\n\"\"\")\r\n\r\nreaduntil(sess, \"\\r\\n\\r\\n\")\r\n\r\nwhile !eof(sess)\r\n  write(STDOUT, read(sess, Uint8))\r\nend\r\n```\r\n[![Bountysource](https://www.bountysource.com/badge/issue?issue_id=7632539)](https://www.bountysource.com/issues/7632539-gzipped-data-is-coming-through-funny?utm_source=7632539&utm_medium=shield&utm_campaign=ISSUE_BADGE)"},"comment":{"url":"https://api.github.com/repos/JuliaWeb/GnuTLS.jl/issues/comments/81752443","html_url":"https://github.com/JuliaWeb/GnuTLS.jl/issues/27#issuecomment-81752443","issue_url":"https://api.github.com/repos/JuliaWeb/GnuTLS.jl/issues/27","id":81752443,"user":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars.githubusercontent.com/u/941359?v=3","gravatar_id":"","url":"https://api.github.com/users/sbromberger","html_url":"https://github.com/sbromberger","followers_url":"https://api.github.com/users/sbromberger/followers","following_url":"https://api.github.com/users/sbromberger/following{/other_user}","gists_url":"https://api.github.com/users/sbromberger/gists{/gist_id}","starred_url":"https://api.github.com/users/sbromberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbromberger/subscriptions","organizations_url":"https://api.github.com/users/sbromberger/orgs","repos_url":"https://api.github.com/users/sbromberger/repos","events_url":"https://api.github.com/users/sbromberger/events{/privacy}","received_events_url":"https://api.github.com/users/sbromberger/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T15:48:02Z","updated_at":"2015-03-16T15:48:02Z","body":"Edited the title because I'm not sure we want to set this sort of precedent."}}