On Feb 19, 2009, at 2:58 PM, Bob Smyph wrote:

> I have tried to do this with the irb and here is what I am getting:
>
> C:\ruby>irb
> irb(main):001:0> require 'net/https'
> => true
> irb(main):002:0> @connection = Net::HTTP.new("172.31.3.97", 8080)
> => #<Net::HTTP 172.31.3.97:8080 open=false>
> irb(main):003:0> @connection.use_ssl = true
> => true
> irb(main):004:0> @connection.verify_mode = OpenSSL::SSL::VERIFY_NONE
> => 0
> irb(main):005:0> @connection.get("myRequestString")
> => #<Net::HTTPVersionNotSupported 505 HTTP Version Not Supported
> readbody=true>
> irb(main):006:0>
>
> anyone have any idea why I would be getting the 505 error. I only
> required https not http so I dont understand what is going on here. I
> have been searching for help on this error but cant seem to find any
> real good explainations or ideas on how to fix it.
>
> Also if I am doing something wrong with the irb pointers in that area
> would be helpful too because I have never used the irb.
> --  
> Posted via http://www.ruby-forum.com/.
>


What happens if you hit this URL in a browser:

https://172.31.3.97:8080/

Particularly, one that will let you see the details like Firefox with  
the Firebug add-on.

Or (if you have these tools on you Windows):

telnet 172.31.3.97 8080
GET / HTTP/1.0

(hit return twice after the GET... line)

telnet 172.31.3.97 8080
GET / HTTP/1.1
Host: 172.31.3.97

(two returns after the Host:... line)

You need to take baby steps. Test OUTSIDE the code when you can and  
then you'll know what the response should be.

-Rob

Rob Biedenharn		http://agileconsultingllc.com
Rob / AgileConsultingLLC.com