{"action":"created","issue":{"url":"https://api.github.com/repos/phusion/passenger/issues/1763","repository_url":"https://api.github.com/repos/phusion/passenger","labels_url":"https://api.github.com/repos/phusion/passenger/issues/1763/labels{/name}","comments_url":"https://api.github.com/repos/phusion/passenger/issues/1763/comments","events_url":"https://api.github.com/repos/phusion/passenger/issues/1763/events","html_url":"https://github.com/phusion/passenger/issues/1763","id":138168895,"number":1763,"title":"rails send_data sending 0 bytes after update to 5.0.26","user":{"login":"fernandoluizao","id":52836,"avatar_url":"https://avatars.githubusercontent.com/u/52836?v=3","gravatar_id":"","url":"https://api.github.com/users/fernandoluizao","html_url":"https://github.com/fernandoluizao","followers_url":"https://api.github.com/users/fernandoluizao/followers","following_url":"https://api.github.com/users/fernandoluizao/following{/other_user}","gists_url":"https://api.github.com/users/fernandoluizao/gists{/gist_id}","starred_url":"https://api.github.com/users/fernandoluizao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fernandoluizao/subscriptions","organizations_url":"https://api.github.com/users/fernandoluizao/orgs","repos_url":"https://api.github.com/users/fernandoluizao/repos","events_url":"https://api.github.com/users/fernandoluizao/events{/privacy}","received_events_url":"https://api.github.com/users/fernandoluizao/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phusion/passenger/labels/Priority/High","name":"Priority/High","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/phusion/passenger/milestones/45","html_url":"https://github.com/phusion/passenger/milestones/5.0.27","labels_url":"https://api.github.com/repos/phusion/passenger/milestones/45/labels","id":1591030,"number":45,"title":"5.0.27","description":"","creator":{"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},"open_issues":26,"closed_issues":1,"state":"open","created_at":"2016-02-18T15:57:50Z","updated_at":"2016-03-08T13:14:18Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2016-03-03T12:43:10Z","updated_at":"2016-03-10T15:24:06Z","closed_at":null,"body":"Hi,\r\n\r\nI have the following code:\r\n\r\n```\r\n  def index\r\n     @items = Item.all\r\n     respond_to do |format|\r\n      format.csv do\r\n        csv = CSV.generate({:col_sep => ';'}) do |csv|\r\n          csv << [\"Id\", \"Name\"]\r\n\r\n          @items.each do |item|\r\n            csv << [\r\n              item.id,\r\n              item.name\r\n            ]\r\n          end\r\n        end\r\n        send_data csv.encode(\"UTF-16LE\"), :filename => 'items.csv'\r\n      end\r\n    end\r\n  end\r\n```\r\n\r\nThis code was running nice on Passenger 5.0.25 with Apache, CSV is returned correctly.\r\n\r\nBut after upgrade to 5.0.26, my app is returning a 0 byte file.\r\n\r\nI think it may be related to https://github.com/phusion/passenger/commit/99968801d9af84638c2fdd5553d7011b3fe817c0 but I'm not familiar with passenger sources. I'm doing something wrong?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/phusion/passenger/issues/comments/194903010","html_url":"https://github.com/phusion/passenger/issues/1763#issuecomment-194903010","issue_url":"https://api.github.com/repos/phusion/passenger/issues/1763","id":194903010,"user":{"login":"OnixGH","id":10709325,"avatar_url":"https://avatars.githubusercontent.com/u/10709325?v=3","gravatar_id":"","url":"https://api.github.com/users/OnixGH","html_url":"https://github.com/OnixGH","followers_url":"https://api.github.com/users/OnixGH/followers","following_url":"https://api.github.com/users/OnixGH/following{/other_user}","gists_url":"https://api.github.com/users/OnixGH/gists{/gist_id}","starred_url":"https://api.github.com/users/OnixGH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OnixGH/subscriptions","organizations_url":"https://api.github.com/users/OnixGH/orgs","repos_url":"https://api.github.com/users/OnixGH/repos","events_url":"https://api.github.com/users/OnixGH/events{/privacy}","received_events_url":"https://api.github.com/users/OnixGH/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T15:24:05Z","updated_at":"2016-03-10T15:24:05Z","body":"We provide the essential binaries from our repo. The ruby native extensions that are getting compiled just give a very small performance boost so they are optional.\r\n\r\nIt just happens that in this case the native code handles the encodings better than the non-native code so having compilation succeed avoids the issue.\r\n\r\n5.0.25 had the same code, but maybe something changed in 5.0.26 such that the native compilation stopped working for you, I'll to discuss that with @FooBarWidget. Can you confirm that 5.0.25 did have working compilation for you (with the same environment / user, etc.)?"}}