mirror of
https://github.com/9001/copyparty.git
synced 2025-11-24 07:23:22 -07:00
u2c: fix delete-url (closes #948);
u2c would produce an URL which triggered a windows-only sanchk serverside, rejecting the delete-request
This commit is contained in:
parent
cdd5e78adf
commit
d3dd34569a
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
|
|
||||||
S_VERSION = "2.13"
|
S_VERSION = "2.14"
|
||||||
S_BUILD_DT = "2025-09-05"
|
S_BUILD_DT = "2025-10-24"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
u2c.py: upload to copyparty
|
u2c.py: upload to copyparty
|
||||||
|
|
@ -1225,9 +1225,7 @@ class Ctl(object):
|
||||||
while req:
|
while req:
|
||||||
print("DELETING ~%s#%s" % (srd, len(req)))
|
print("DELETING ~%s#%s" % (srd, len(req)))
|
||||||
body = json.dumps(req).encode("utf-8")
|
body = json.dumps(req).encode("utf-8")
|
||||||
sc, txt = web.req(
|
sc, txt = web.req("POST", "/?delete", {}, body, MJ)
|
||||||
"POST", self.ar.url + "?delete", {}, body, MJ
|
|
||||||
)
|
|
||||||
if sc == 413 and "json 2big" in txt:
|
if sc == 413 and "json 2big" in txt:
|
||||||
print(" (delete request too big; slicing...)")
|
print(" (delete request too big; slicing...)")
|
||||||
req = req[: len(req) // 2]
|
req = req[: len(req) // 2]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue