{"action":"created","issue":{"url":"https://api.github.com/repos/phusion/passenger/issues/1503","labels_url":"https://api.github.com/repos/phusion/passenger/issues/1503/labels{/name}","comments_url":"https://api.github.com/repos/phusion/passenger/issues/1503/comments","events_url":"https://api.github.com/repos/phusion/passenger/issues/1503/events","html_url":"https://github.com/phusion/passenger/issues/1503","id":74160387,"number":1503,"title":"unable to unzip gzipped files in custom app using Passenger 5","user":{"login":"littleforest","id":1938665,"avatar_url":"https://avatars.githubusercontent.com/u/1938665?v=3","gravatar_id":"","url":"https://api.github.com/users/littleforest","html_url":"https://github.com/littleforest","followers_url":"https://api.github.com/users/littleforest/followers","following_url":"https://api.github.com/users/littleforest/following{/other_user}","gists_url":"https://api.github.com/users/littleforest/gists{/gist_id}","starred_url":"https://api.github.com/users/littleforest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littleforest/subscriptions","organizations_url":"https://api.github.com/users/littleforest/orgs","repos_url":"https://api.github.com/users/littleforest/repos","events_url":"https://api.github.com/users/littleforest/events{/privacy}","received_events_url":"https://api.github.com/users/littleforest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-07T23:20:36Z","updated_at":"2015-05-19T22:04:32Z","closed_at":null,"body":"We have a setup where we are using ActiveSupport::Gzip to compress plain text data and send it to a custom app using the send_data method.  The app uses the standard \"deflate\" compression. We have a working production site using Ruby 1.9.3, Rails 3.2 and Passenger 3.0.19 on Ubuntu 14.04.2. LTS.\r\n\r\nWe upgraded to Ruby 2.1.5 and the latest stable Passenger 4 version, but had issues with the app receiving the contents of the send_data method, we believe due to the chunking bug that was fixed in version 5.  After we upgraded to version 5.0.7, the app can now receive the contents, but cannot unzip it.  We believe this is an issue with Passenger, as our configuration on development using Thin as the webserver functions with no issues.\r\n\r\nThe app uses the standard deflate compression method, per [these specs](http://www.ietf.org/rfc/rfc1952.txt). We have tried using the Zlib::GzipWriter method and passing different compression levels, but nothing works.  Is it possible that Passenger is mangling something along the way, causing the app to be unable to read the file?  We can hit the same URL that the app is requesting in a browser and have no issues unzipping the file.  \r\n\r\nA working production file is posted [here](https://s3.amazonaws.com/passenger-tmp/mediaProduction.gz), and the failing staging file is posted [here](https://s3.amazonaws.com/passenger-tmp/mediaStaging.gz).\r\n\r\nThanks for any help you can provide.  We are at a complete loss.\r\n"},"comment":{"url":"https://api.github.com/repos/phusion/passenger/issues/comments/103680722","html_url":"https://github.com/phusion/passenger/issues/1503#issuecomment-103680722","issue_url":"https://api.github.com/repos/phusion/passenger/issues/1503","id":103680722,"user":{"login":"FooBarWidget","id":819,"avatar_url":"https://avatars.githubusercontent.com/u/819?v=3","gravatar_id":"","url":"https://api.github.com/users/FooBarWidget","html_url":"https://github.com/FooBarWidget","followers_url":"https://api.github.com/users/FooBarWidget/followers","following_url":"https://api.github.com/users/FooBarWidget/following{/other_user}","gists_url":"https://api.github.com/users/FooBarWidget/gists{/gist_id}","starred_url":"https://api.github.com/users/FooBarWidget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FooBarWidget/subscriptions","organizations_url":"https://api.github.com/users/FooBarWidget/orgs","repos_url":"https://api.github.com/users/FooBarWidget/repos","events_url":"https://api.github.com/users/FooBarWidget/events{/privacy}","received_events_url":"https://api.github.com/users/FooBarWidget/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T22:04:32Z","updated_at":"2015-05-19T22:04:32Z","body":"The culprit may not necessarily be Passenger. It may be Apache for some reason.\r\n\r\nCan you test your app in Passenger Standalone, using the 'builtin' engine? You can start your app like this:\r\n\r\n    passenger start --engine=builtin\r\n\r\nDoes that trigger the issue too?"}}