{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/discuss/issues/392","repository_url":"https://api.github.com/repos/hapijs/discuss","labels_url":"https://api.github.com/repos/hapijs/discuss/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/discuss/issues/392/comments","events_url":"https://api.github.com/repos/hapijs/discuss/issues/392/events","html_url":"https://github.com/hapijs/discuss/issues/392","id":185141467,"number":392,"title":"Response not being gzipped for simple JSON","user":{"login":"jasonmacdonald","id":5718527,"avatar_url":"https://avatars.githubusercontent.com/u/5718527?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmacdonald","html_url":"https://github.com/jasonmacdonald","followers_url":"https://api.github.com/users/jasonmacdonald/followers","following_url":"https://api.github.com/users/jasonmacdonald/following{/other_user}","gists_url":"https://api.github.com/users/jasonmacdonald/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmacdonald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmacdonald/subscriptions","organizations_url":"https://api.github.com/users/jasonmacdonald/orgs","repos_url":"https://api.github.com/users/jasonmacdonald/repos","events_url":"https://api.github.com/users/jasonmacdonald/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmacdonald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-10-25T14:53:39Z","updated_at":"2016-10-25T15:37:13Z","closed_at":null,"body":"I'm sure this is me doing something wrong, but I have a super simple example of a JSON file being returned that is not being GZipped - but should be. I've followed the code all the way to the transmit function and it is gzipping the response and adding the header, but when it arrives back at the browser, the header is gone and it's no longer Gzipped. I can't for the life of me figure out why.\r\n\r\nHere is my simple sample. My real application is sending a much larger JSON document, but I can't get even this to send GZipped.\r\n\r\n```\r\n'use strict';\r\nconst Hapi = require('hapi');\r\nconst server = new Hapi.Server();\r\nserver.connection({ port: 3000 });\r\n\r\nserver.route({\r\n    method: 'GET',\r\n    path: '/',\r\n    handler: function (request, reply) {\r\n        let json = {test: 1};\r\n        reply(json).type('application/json');\r\n    }\r\n});\r\n\r\nserver.start((err) => {\r\n    if (err) {\r\n        throw err;\r\n    }\r\n});\r\n```\r\n\r\n\r\nWHat really confuses me is as far as I can trace, the header is there and the content is zipped, but somehow it's lost when the response gets to the browser or POSTMAN."},"comment":{"url":"https://api.github.com/repos/hapijs/discuss/issues/comments/256072018","html_url":"https://github.com/hapijs/discuss/issues/392#issuecomment-256072018","issue_url":"https://api.github.com/repos/hapijs/discuss/issues/392","id":256072018,"user":{"login":"jasonmacdonald","id":5718527,"avatar_url":"https://avatars.githubusercontent.com/u/5718527?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmacdonald","html_url":"https://github.com/jasonmacdonald","followers_url":"https://api.github.com/users/jasonmacdonald/followers","following_url":"https://api.github.com/users/jasonmacdonald/following{/other_user}","gists_url":"https://api.github.com/users/jasonmacdonald/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmacdonald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmacdonald/subscriptions","organizations_url":"https://api.github.com/users/jasonmacdonald/orgs","repos_url":"https://api.github.com/users/jasonmacdonald/repos","events_url":"https://api.github.com/users/jasonmacdonald/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmacdonald/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T15:37:13Z","updated_at":"2016-10-25T15:37:13Z","body":"@devinivy thanks, I was missing that. I do indeed see now that the gzip is being set. So something else running a muck.\r\n\r\nThank-you for the help! At least I know now it's just my machine and not my app. :)"}}
{"actor":{"display_login":"jasonmacdonald"}}