Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility for Rails request body input stream #209

Open
obfuscoder opened this issue May 4, 2017 · 0 comments
Open

Incompatibility for Rails request body input stream #209

obfuscoder opened this issue May 4, 2017 · 0 comments

Comments

@obfuscoder
Copy link

obfuscoder commented May 4, 2017

We have a controller PUT request which is receiving a zip file in the body as binary blob.

Using the rubyzip-gem with MRI we can use this:

Zip::File.open_buffer request.body

The request body is of type StringIO. When running this on JRuby in production mode, we get the following runtime error:

Zip::File.open_buffer expects a String or IO-like argument (responds to tell, seek, read, close). Found: JRuby::Rack::Input (RuntimeError)

I suppose the JRuby rack input implementation does not suppose seeking as the MRI implementation does.

We use JRuby 1.7.23 and Rails 4.2.8 with jruby-rack 1.1.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant