res['location']
returns the original URL along with this error: #<Net::HTTPMovedPermanently:foo>
My code:
uri = URI.parse(url)
res = Net::HTTP.new(uri.host).request(Net::HTTP::Get.new(uri))
puts res['location']
Shouldn't res['location']
return the redirect URI?