mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Fix server verification for unpublished servers
This commit is contained in:
parent
1ff1270bfa
commit
c17bf79d79
4 changed files with 45 additions and 37 deletions
|
@ -44,7 +44,8 @@ class HTTPHandler(object):
|
|||
headers=None,
|
||||
output_format='raw',
|
||||
return_type=False,
|
||||
no_token=False):
|
||||
no_token=False,
|
||||
timeout=20):
|
||||
|
||||
valid_request_types = ['GET', 'POST', 'PUT', 'DELETE']
|
||||
|
||||
|
@ -56,12 +57,12 @@ class HTTPHandler(object):
|
|||
if proto.upper() == 'HTTPS':
|
||||
if not self.ssl_verify and hasattr(ssl, '_create_unverified_context'):
|
||||
context = ssl._create_unverified_context()
|
||||
handler = HTTPSConnection(host=self.host, port=self.port, timeout=20, context=context)
|
||||
handler = HTTPSConnection(host=self.host, port=self.port, timeout=timeout, context=context)
|
||||
logger.warn(u"PlexPy HTTP Handler :: Unverified HTTPS request made. This connection is not secure.")
|
||||
else:
|
||||
handler = HTTPSConnection(host=self.host, port=self.port, timeout=20)
|
||||
handler = HTTPSConnection(host=self.host, port=self.port, timeout=timeout)
|
||||
else:
|
||||
handler = HTTPConnection(host=self.host, port=self.port, timeout=20)
|
||||
handler = HTTPConnection(host=self.host, port=self.port, timeout=timeout)
|
||||
|
||||
token_string = ''
|
||||
if not no_token:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue