Issue with RackRewindableInput

Seems that the read method on the RackRewindableInput class returns an
empty string at the end of input, as opposed to a nil object like other
IO-ish objects do. Is this by design or a bug?

I’ve got an app that started hanging after updating jruby+rack+rails
that was doing a b = request.body; while(x=b.read(1024)) to read the
body of the request in chunks, because read always returns a string.
Have changed my code to while(!(x=b.read(1024).blank?)).

Dan.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Ouch! Looks like you’re right. read(1024) returns nil at the end per
ri, while read() returns empty. Would you mind filing a bug at
http://kenai.com/jira/browse/JRUBY_RACK?

Thanks,
/Nick

On Wed, Dec 9, 2009 at 12:16 AM, Daniel S. [email protected]
wrote:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email