mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
fix printing big unicode messages
This commit is contained in:
parent
53bb1c719b
commit
a286cc9d55
|
@ -710,7 +710,13 @@ class HttpCli(object):
|
|||
self.log("urlform: {} bytes, {}".format(post_sz, path))
|
||||
elif "print" in opt:
|
||||
reader, _ = self.get_body_reader()
|
||||
for buf in reader:
|
||||
buf = b""
|
||||
for rbuf in reader:
|
||||
buf += rbuf
|
||||
if len(buf) > 32768:
|
||||
break
|
||||
|
||||
if buf:
|
||||
orig = buf.decode("utf-8", "replace")
|
||||
t = "urlform_raw {} @ {}\n {}\n"
|
||||
self.log(t.format(len(orig), self.vpath, orig))
|
||||
|
|
Loading…
Reference in a new issue