in pypubsub.py [0:0]
def __init__(self, server: Server, request: aiohttp.web.BaseRequest):
self.connection: typing.Optional[aiohttp.web.StreamResponse] = None
self.acl = {}
self.server = server
self.lock = asyncio.Lock()
self.secure_topics = []
# Set topics subscribed to
self.topics = []
for topic_batch in request.path.split(','):
sub_to = [x for x in topic_batch.split('/') if x]
self.topics.append(sub_to)
# Is the client old and expecting zero-terminators?
self.old_school = False
for ua in self.server.config.oldschoolers:
if ua in request.headers.get('User-Agent', ''):
self.old_school = True
break