kidpollo / tanker

IndexTank Integration with your fav ORM
MIT License
97 stars 30 forks source link

cannot connect to index tank on other port besides 80 #57

Closed trungpham closed 12 years ago

trungpham commented 12 years ago

def execute(req) res = Net::HTTP.new(@uri.host).start { |http| http.request(req) } if res.is_a? Net::HTTPSuccess if res.body.nil? or res.body.empty? return res.code, nil else begin return res.code, JSON.parse(res.body) rescue raise "Invalid JSON response: #{res.body}" end end elsif res.is_a? Net::HTTPUnauthorized raise SecurityError, "Authorization required" elsif res.is_a? Net::HTTPBadRequest raise ArgumentError, res.body else raise HttpCodeException.new(res.code, res.body) end end

it seems like the code only forward the host part of the uri, and not the port.