Revert "Fix to Plex Companion response not conform to HTTP standards"

This reverts commit 531dba40bf.
This commit is contained in:
tomkat83 2016-02-10 13:51:14 +01:00
parent ea63801a2b
commit 5a4f4a9b71
2 changed files with 4 additions and 9 deletions

View file

@ -185,12 +185,11 @@ class DownloadUtils():
header = plx.getXArgsDeviceInfo(options=options)
return header
def downloadUrl(self, url, postBody=None, type="GET", parameters=None, authenticate=True, headerOptions={}, timeout=None):
def downloadUrl(self, url, postBody=None, type="GET", parameters=None, authenticate=True, headerOptions={}):
# self.logMsg("=== ENTER downloadUrl ===", 2)
if timeout is None:
timeout = self.timeout
timeout = self.timeout
default_link = ""
try:
@ -366,7 +365,7 @@ class DownloadUtils():
except requests.exceptions.ConnectTimeout as e:
self.logMsg("Server timeout at: %s" % url, 0)
# self.logMsg(e, 1)
self.logMsg(e, 1)
except requests.exceptions.HTTPError as e:

View file

@ -243,14 +243,10 @@ class Subscriber:
url = self.protocol + '://' + self.host + ':' + self.port \
+ "/:/timeline"
# Choose an extremely low timeout due to Plex players response not
# being conform to HTTP standards (content length is wrong). Otherwise,
# This thread gets blocked for a couple of seconds
response = self.download.downloadUrl(
url,
postBody=msg,
type="POSTXML",
timeout=0.001)
type="POSTXML")
# if not requests.post(self.host, self.port, "/:/timeline", msg, getPlexHeaders(), self.protocol):
# subMgr.removeSubscriber(self.uuid)
if response in [False, None, 401]: