Net::HTTP breaks with https URI objects
uri = URI('https://example.com/index.html?count=10')
will currently fail with an obscure error due to Net::HTTP attempting to speak HTTP to an HTTPS service.
I believe this is a bug, and have patched lib/net/http.rb to use SSL when you use an https URI with the get and post_form helpers.
#5 Updated by Yui NARUSE almost 5 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33849.
Mark, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
if given URI object is https.
patched by Mark Ferlatte [Bug #5545]
lib/net/http.rb (Net::HTTP.post_form): ditto.