fix write_text not returning the file name
This commit is contained in:
parent
962a06fa70
commit
aa1ee1d0ad
|
@ -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):
|
||||||
|
|
Reference in a new issue