X-Git-Url: http://andersk.mit.edu/gitweb/jira-zephyrbot.git/blobdiff_plain/3dae361a46538f16eff254628a44bcf5d865c5e4..162e61c2b3350911d90dcbbb8f1adc053b6ea88a:/urllib-cert.py diff --git a/urllib-cert.py b/urllib-cert.py deleted file mode 100644 index 3781026..0000000 --- a/urllib-cert.py +++ /dev/null @@ -1,26 +0,0 @@ -import urllib2 -import httplib - -cert_file = "cert.pem" -key_file = cert_file - -class HTTPSCertConnection(httplib.HTTPSConnection): - def __init__(self, host): - httplib.HTTPSConnection.__init__(self, host, None, key_file, cert_file) - -class HTTPSCertHandler(urllib2.HTTPSHandler): - def do_open(self, http_class, req): - if http_class is httplib.HTTPSConnection: - http_class = HTTPSCertConnection - return urllib2.HTTPSHandler.do_open(self, http_class, req) - -opener = urllib2.build_opener(urllib2.HTTPRedirectHandler, HTTPSCertHandler) -urllib2.install_opener(opener) - -#req = urllib2.Request(url='https://geofft.scripts.mit.edu:444/detect.php') -#f = urllib2.urlopen(req) -#print f.read() - -req = urllib2.Request(url='https://jira.mit.edu/jira/secure/mit_login.jsp?os_destination=/secure/Dashboard.jspa') -print urllib2.urlopen(req).read() -