Is there a way to force Python's client.HTTPConnection to connect to a specific IP address? I am writing a program that checks for the presence of a file on a web server, but I want to check every single web server, and the web servers use DNS round-robin. So I am using dns.resolver.query to get a list of all of the IP addresses associated with a specific IP address, and then I am using client.HTTPConnection to connect to each one. At least, that's what I want to do, but the client.HTTPConnection doesn't seem to.
Internally, client.HTTPConnection eventually calls socket.create_connection, but I've traced the code and can't figure out a good work-around.
I've tried URL's like http://2899902734:80/ for Google as well as http://172.217.1.14 and they don't work.