net http and gzip decompression in 1.9
--------------------------------------
Key: JRUBY-5778
URL: http://jira.codehaus.org/browse/JRUBY-5778
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.6.1
Reporter: Karl Baum
I get the following error when trying to connect to a gzipped activeresource
url:
ArgumentError: wrong number of arguments (2 for 1)
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:886:in `get'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1186:in
`transport_request'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:2334:in
`reading_body'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1185:in
`transport_request'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1169:in `request'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1162:in `request'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:627:in `start'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1160:in `request'
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:880:in `get'
from org/jruby/RubyBasicObject.java:1679:in `__send__'
from org/jruby/RubyKernel.java:2081:in `send'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/connection.rb:112:in
`request'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in
`instrument'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activesupport-3.0.7/lib/active_support/notifications/instrumenter.rb:21:in
`instrument'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in
`instrument'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/connection.rb:109:in
`request'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/connection.rb:79:in
`get'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/connection.rb:217:in
`with_auth'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/connection.rb:79:in
`get'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/base.rb:857:in
`find_every'
from
/home/ubuntu/.rvm/gems/jruby-1.6.1@email-gateway/gems/activeresource-3.0.7/lib/active_resource/base.rb:777:in
`find'
from
/data/email-gateway/releases/20110505230551/lib/connection_pool_factory.rb:11:in
`init'
from
/data/email-gateway/releases/20110505230551/./lib/email_gateway.rb:38:in
`(root)'
from org/jruby/RubyKernel.java:1047:in `require'
from
/data/email-gateway/releases/20110505230551/./lib/email_gateway.rb:1:in
`evaluate'
from org/jruby/RubyKernel.java:1093:in `eval'
from org/jruby/RubyKernel.java:1418:in `loop'
from org/jruby/RubyKernel.java:1205:in `catch'
from org/jruby/RubyKernel.java:1205:in `catch'
Was able to address by taking away the second argument within the
Zlip::GzipReader constructor:
r.body= Zlib::GzipReader.new(StringIO.new(the_body), encoding:
"ASCII-8BIT").read
to
r.body= Zlib::GzipReader.new(StringIO.new(the_body)).read
thx.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email