Twisted: Get Protected HTTPS Page via Proxy with Authentication
Robert Hancock
hancock.robert at gmail.com
Tue Sep 23 15:11:03 EDT 2008
This works:
# Proxy credentials
proxyAuth = base64.encodestring('%s:%s' % (proxy_username,
proxy_password))
proxy_authHeader = "Basic " + proxyAuth.strip()
# Web site credentials
basicAuth = base64.encodestring('%s:%s' % (username,
password))
authHeader = "Basic " + basicAuth.strip()
return client.getPage(url, headers={"Authorization":
authHeader, 'Proxy-Authenticate': proxy_authHeader})
More information about the Python-list
mailing list