* refactor receiverid into a separate controller base

* allow multiple headers to prepare for checking multiple claims
This commit is contained in:
Jakob Ketterl
2020-07-04 21:47:56 +02:00
parent e0129fd0f7
commit 0e6518915d
4 changed files with 43 additions and 18 deletions

View File

@ -18,7 +18,11 @@ class Controller(object):
if max_age is not None:
headers["Cache-Control"] = "max-age: {0}".format(max_age)
for key, value in headers.items():
self.handler.send_header(key, value)
if isinstance(value, list):
for v in value:
self.handler.send_header(key, v)
else:
self.handler.send_header(key, value)
self.handler.end_headers()
if type(content) == str:
content = content.encode()