diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index deb16013..2d7f682c 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -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))