Forum: Ruby Curious termination on connecting via SSL

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1ebc9ec4bf5ab8d5ea448908b9c1079b?d=identicon&s=25 Joe Pym (hitonagashi)
on 2007-07-02 13:11

Firstly, just wanted to say the documentation on here is great, its
helped me out a lot. However, in my recent code, I've run into a bug
which I can't work out why it is happening. I'm attempting to submit a
POST operation to a secure website. The relevant section is:

  site ='', 443)
  site.use_ssl = true
  print 'TEST '
  site.start'/submissionurl', @data.to_s)
  print 'a'
  print ' ERROR '
  print ' Working '
  print 'd'
  print 'a'

I get the following output:

*** WARNING *** Windows users should check the "Run process in terminal"
check box in the Debugger Preferences
to see STDOUT and STDERR output in real time.
TEST warning: peer certificate won't be verified in this SSL session

The interesting thing for me is that it does not matter what I put after
the site.start command, as long as it is syntactically valid, no errors
are thrown(for example site.completegarbage gives the same output).
Also, as far as I can tell, it should print out the 'd' at least,
because it is in an ensure block.

I'm using Ruby version 1.8, installed on Windows XP with the one click
installer. I have already included 'net/https' and 'uri'.

Any help would be greatly appreciated..I don't quite understand how it
is behaving like that.


This topic is locked and can not be replied to.