Problems with Net::HTTPS in ruby-1.8.0-preview3

  • Thread starter James F. Hranicky
  • Start date

J

James F. Hranicky

I'm having trouble using Net::HTTPS/ossl-0.2.0-pre2 with the 1.8.0-preview3:

------------------
#!/local/bin/ruby

require 'net/https'

def Main

http = Net::HTTP.new('www.cise.ufl.edu', 443)

http.use_ssl = true
p http.use_ssl

http.get2("/") { |r|
p r.body
}

end

Main()
------------------

<[email protected]:~/scratch> 462 : ./www.rb
/usr/local/lib/ruby/site_ruby/1.8/net/https.rb:113: warning: toplevel
constant HTTPRequest referenced by Net::NetPrivate::HTTPRequest
/usr/local/lib/ruby/site_ruby/1.8/net/https.rb:113: undefined superclass
`HTTPRequest' (TypeError)
from ./www.rb:3:in `require'
from ./www.rb:3

Any ideas? This works fine with ruby 1.7.2 (2002-04-18) and ossl-0.1.0.

Testing platforms:

Solaris 8 ruby-1.7.2 ossl-0.1.0 : success
Solaris 8 ruby-1.8.0-pre3 ossl-0.2.0-pre : fail
FreeBSD 4.8 ruby-1.8.0-pre3 ossl-0.2.0-pre : fail
 
Ad

Advertisements

N

NAKAMURA, Hiroshi

Hi,
From: "James F. Hranicky" <[email protected]>
Sent: Tuesday, July 01, 2003 10:54 PM
I'm having trouble using Net::HTTPS/ossl-0.2.0-pre2 with the 1.8.0-preview3:

ossl2 is growing day by day in these weeks.

* net/https on ossl2 CVS HEAD
http://savannah.nongnu.org/cvs/?group=rubypki
* http-access2 CVS HEAD
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/http-access2/
should now do SSL with ossl2.

WARN: ossl2 requires Ruby/1.8 and OpenSSL/0.9.7.

Regards,
// NaHi
 
Ad

Advertisements

M

Minero Aoki

Hi,

In mail "Problems with Net::HTTPS in ruby-1.8.0-preview3"
James F. Hranicky said:
I'm having trouble using Net::HTTPS/ossl-0.2.0-pre2 with the 1.8.0-preview3:
<[email protected]:~/scratch> 462 : ./www.rb
/usr/local/lib/ruby/site_ruby/1.8/net/https.rb:113: warning: toplevel
constant HTTPRequest referenced by Net::NetPrivate::HTTPRequest
/usr/local/lib/ruby/site_ruby/1.8/net/https.rb:113: undefined superclass
`HTTPRequest' (TypeError)
from ./www.rb:3:in `require'
from ./www.rb:3

This is caused by net/http's incompatibility.
Please try attached patch.

Regards,
Minero Aoki

--- http.rb 24 Jun 2003 07:42:46 -0000 1.85
+++ http.rb 2 Jul 2003 02:05:35 -0000 1.86
@@ -1738,8 +1738,14 @@ module Net
end


-
# for backward compatibility
+
+ class HTTP
+ ProxyMod = ProxyDelta
+ end
+ module NetPrivate
+ HTTPRequest = ::Net::HTTPRequest
+ end

HTTPInformationCode = HTTPInformation
HTTPSuccessCode = HTTPSuccess
--- protocol.rb 6 Jun 2003 07:05:52 -0000 1.68
+++ protocol.rb 2 Jul 2003 02:05:34 -0000 1.69
@@ -447,6 +447,12 @@ module Net
yield str
end

+ end
+
+
+ # For backward compatibility
+ module NetPrivate
+ Socket = ::Net::InternetMessageIO
end

end # module Net
 

Top