I use my own resolver and would like to use urllib2 to connect to IP (without permission in urllib2), and I would like to configure the HTTP Host header myself. But urllib2 just ignores my host header:
txheaders = { 'User-Agent': UA, "Host: ": nohttp_url } robots = urllib2.Request("http://" + ip + "/robots.txt", txdata, txheaders)
jonasl
source share