fix write_text not returning the file name

This commit is contained in:
dece 2022-09-03 15:56:21 +02:00
parent 962a06fa70
commit aa1ee1d0ad

View file

@ -102,8 +102,8 @@ class Handler(socketserver.StreamRequestHandler):
def write_text(data: bytes, title=None):
content = "<pre>{}</pre>".format(data.decode(errors="replace"))
html = HTML_TEMPLATE.format(title=title or "?", content=content).encode()
write_content(html)
html = HTML_TEMPLATE.format(title=title or "", content=content).encode()
return write_content(html)
def write_content(data: bytes):