From: Jason DiCioccio Date: 2001-10-10T02:41:12+09:00 Subject: [ruby-talk:22323] Problems with net/https :( --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm having issues using net/https (https.rb revision 1.5).. I have the following block of code: require 'net/https' # Fetch the requested document # This used to be more condensed, e.g. Net::HTTP.start( host, port ) # However, that did not work either. http =3D Net::HTTP.new(host, port) http.use_ssl =3D true if scheme =3D=3D "https" # enable SSL/TLS http.start do |h| timeout(15) do h.get2( path ) do |recv| ...... end h.get2( path2 ) do |recv| ...... end end end Basically what happens in a block like this is that the first get2 block wo= rks and fetches the correct page while the second one does not. I can send the whole program on request, but this should be sufficient. Note that this bl= ock of code works with HTTP but not HTTPS.. I'm using ruby 1.6.5. If anyone has any clue why this would be happening or if it's a bug (which I assume it is,) then I would love to have a workaround for this problem. I found a workaround of recreating the http/h objects every time I need to do 'get2' = but this is extremely sloppy and there must be a better way to do it. Thanks in advance, -JD- --=20 Jason DiCioccio - geniusj@bsd.st - PGP Key @ http://bsd.st/~geniusj/pgpkey.= asc PGP Key Fingerprint C442 04E2 26B0 3809 8357 96AB D350 9596 0436 7C08 --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBO8M3ENNQlZYENnwIEQIm6ACgq/l5ArkzrXD1CAYDtH2ujQLX7U8AoIC+ fTz6ZG5kqu2XPB516xXfGdCU =r3hl -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--