JRuby with Ruby on Rails HTTP Streaming outputting odd characters

I’m using Ruby on Rails with JRuby on Tomcat.

This is my controller:

class ApplicationController < ActionController::Base
def index
render :stream => true, :text => “Hello World!”
end
end

This is the output:

c
Hello World!
0

Does anyone have any idea why the “c” or the “0” characters are output
onto
the page? They do not appear if I set :stream => false. HTTP Streaming
does
seem to work for Ruby on Rails using JRuby on Tomcat, but there’s this
oddity.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs