fix write_text not returning the file name

main
dece 2 years ago
parent 962a06fa70
commit aa1ee1d0ad

@ -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):

Loading…
Cancel
Save