mirror of
https://github.com/9001/copyparty.git
synced 2025-08-20 02:12:20 -06:00
webdav: bump chunksize from 2048 to 32760 byte
This commit is contained in:
parent
79303dac6d
commit
dd26b8f183
|
@ -784,6 +784,8 @@ class HttpCli(object):
|
||||||
fgen = itertools.chain([topdir], fgen) # type: ignore
|
fgen = itertools.chain([topdir], fgen) # type: ignore
|
||||||
vtop = vjoin(vn.vpath, rem)
|
vtop = vjoin(vn.vpath, rem)
|
||||||
|
|
||||||
|
chunksz = 0x7FF8 # preferred by nginx or cf (dunno which)
|
||||||
|
|
||||||
self.send_headers(
|
self.send_headers(
|
||||||
None, 207, "text/xml; charset=" + enc, {"Transfer-Encoding": "chunked"}
|
None, 207, "text/xml; charset=" + enc, {"Transfer-Encoding": "chunked"}
|
||||||
)
|
)
|
||||||
|
@ -827,14 +829,14 @@ class HttpCli(object):
|
||||||
ret += t.format("".join(missing))
|
ret += t.format("".join(missing))
|
||||||
|
|
||||||
ret += "</D:response>"
|
ret += "</D:response>"
|
||||||
while len(ret) >= 0x800:
|
while len(ret) >= chunksz:
|
||||||
ret = self.send_chunk(ret, enc, 0x800)
|
ret = self.send_chunk(ret, enc, chunksz)
|
||||||
|
|
||||||
ret += "</D:multistatus>"
|
ret += "</D:multistatus>"
|
||||||
while ret:
|
while ret:
|
||||||
ret = self.send_chunk(ret, enc, 0x800)
|
ret = self.send_chunk(ret, enc, chunksz)
|
||||||
|
|
||||||
self.send_chunk("", enc, 0x800)
|
self.send_chunk("", enc, chunksz)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def handle_proppatch(self) -> bool:
|
def handle_proppatch(self) -> bool:
|
||||||
|
|
Loading…
Reference in a new issue