Skip to content

Commit

Permalink
enhance WebServer's decission if AppleTV is real...
Browse files Browse the repository at this point in the history
  • Loading branch information
iBaa committed Jun 12, 2013
1 parent 35e16bf commit 96f02fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions WebServer.py
Expand Up @@ -69,8 +69,10 @@ def do_GET(self):
dprint(__name__, 2, "cleaned path:\n{0}", self.path)
dprint(__name__, 2, "request options:\n{0}", options)

if self.headers['Host'] == g_param['HostToIntercept'] and \
self.headers['User-Agent'].startswith("iTunes-AppleTV"):
if 'Host' in self.headers and \
'User-Agent' in self.headers and \
self.headers['Host'] == g_param['HostToIntercept'] and \
'AppleTV' in self.headers['User-Agent']:

# recieve simple logging messages from the ATV
if self.path.endswith("&atvlogger"):
Expand Down

0 comments on commit 96f02fa

Please sign in to comment.