{"action":"created","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/816","labels_url":"https://api.github.com/repos/Mashape/kong/issues/816/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/816/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/816/events","html_url":"https://github.com/Mashape/kong/issues/816","id":123351319,"number":816,"title":"is Json support response-transformer plugin needed?  ","user":{"login":"shashiranjan84","id":8146958,"avatar_url":"https://avatars.githubusercontent.com/u/8146958?v=3","gravatar_id":"","url":"https://api.github.com/users/shashiranjan84","html_url":"https://github.com/shashiranjan84","followers_url":"https://api.github.com/users/shashiranjan84/followers","following_url":"https://api.github.com/users/shashiranjan84/following{/other_user}","gists_url":"https://api.github.com/users/shashiranjan84/gists{/gist_id}","starred_url":"https://api.github.com/users/shashiranjan84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashiranjan84/subscriptions","organizations_url":"https://api.github.com/users/shashiranjan84/orgs","repos_url":"https://api.github.com/users/shashiranjan84/repos","events_url":"https://api.github.com/users/shashiranjan84/events{/privacy}","received_events_url":"https://api.github.com/users/shashiranjan84/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mashape/kong/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-21T20:28:04Z","updated_at":"2015-12-21T21:16:57Z","closed_at":null,"body":"@thefosk  I was discussing the plugin with @thibaultCha and it seems like json transformation will fail for response body bigger than buffer size. By the time plugin will update the body it will may already be streamed to the client.  Also though allowed its not desirable to set content-length nil as it may break client.\r\n\r\nSo we have choice to remove Json support or document the inability of plugin to handle bigger response. \r\n"},"comment":{"url":"https://api.github.com/repos/Mashape/kong/issues/comments/166426088","html_url":"https://github.com/Mashape/kong/issues/816#issuecomment-166426088","issue_url":"https://api.github.com/repos/Mashape/kong/issues/816","id":166426088,"user":{"login":"shashiranjan84","id":8146958,"avatar_url":"https://avatars.githubusercontent.com/u/8146958?v=3","gravatar_id":"","url":"https://api.github.com/users/shashiranjan84","html_url":"https://github.com/shashiranjan84","followers_url":"https://api.github.com/users/shashiranjan84/followers","following_url":"https://api.github.com/users/shashiranjan84/following{/other_user}","gists_url":"https://api.github.com/users/shashiranjan84/gists{/gist_id}","starred_url":"https://api.github.com/users/shashiranjan84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashiranjan84/subscriptions","organizations_url":"https://api.github.com/users/shashiranjan84/orgs","repos_url":"https://api.github.com/users/shashiranjan84/repos","events_url":"https://api.github.com/users/shashiranjan84/events{/privacy}","received_events_url":"https://api.github.com/users/shashiranjan84/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T21:16:57Z","updated_at":"2015-12-21T21:16:57Z","body":"Just noticed that plugin does not send data to client as soon as it receives  the chunk from upstream server but save to it buffer.\r\nhttps://github.com/Mashape/kong/blob/master/kong/plugins/response-transformer/body_filter.lua#L27\r\n\r\nOnce final chunk is received, transformation is performed and then buffered data is sent to client. \r\n\r\nhttps://github.com/Mashape/kong/blob/master/kong/plugins/response-transformer/body_filter.lua#L49\r\nSo though data is not streamed back but it may still cause memory issue if data is big?\r\n "}}