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): def write_text(data: bytes, title=None):
content = "<pre>{}</pre>".format(data.decode(errors="replace")) content = "<pre>{}</pre>".format(data.decode(errors="replace"))
html = HTML_TEMPLATE.format(title=title or "?", content=content).encode() html = HTML_TEMPLATE.format(title=title or "", content=content).encode()
write_content(html) return write_content(html)
def write_content(data: bytes): def write_content(data: bytes):