|
@@ -17,6 +17,7 @@
|
|
|
from urlparse import urlparse
|
|
|
import logging
|
|
|
import httplib
|
|
|
+import sys
|
|
|
from ssl import SSLError
|
|
|
from HeartbeatHandlers import HeartbeatStopHandlers
|
|
|
|
|
@@ -61,7 +62,13 @@ class NetUtil:
|
|
|
|
|
|
try:
|
|
|
parsedurl = urlparse(url)
|
|
|
- ca_connection = httplib.HTTPSConnection(parsedurl[1])
|
|
|
+
|
|
|
+ if sys.version_info >= (2,7,9):
|
|
|
+ import ssl
|
|
|
+ ca_connection = httplib.HTTPSConnection(parsedurl[1], context=ssl._create_unverified_context())
|
|
|
+ else:
|
|
|
+ ca_connection = httplib.HTTPSConnection(parsedurl[1])
|
|
|
+
|
|
|
ca_connection.request("GET", parsedurl[2])
|
|
|
response = ca_connection.getresponse()
|
|
|
status = response.status
|