How can I grab an HTML response when there are no response headers?
I've got this:
require 'hpricot'
require 'open-uri'
doc = Hpricot(open('http://192.168.100.1/phy.htm'))
The server in this case is a cable modem that is not returning HTTP Response headers.
The above code is failing with:
C:/Ruby/lib/ruby/1.8/net/http.rb:2022:in `read_status_line': wrong status line: "" (Net::HTTPBadResponse)
from C:/Ruby/lib/ruby/1.8/net/http.rb:2009:in `read_new'
from C:/Ruby/lib/ruby/1.8/net/http.rb:1050:in `request'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:248:in `open_http'