add webdav write support + fix http 200/201

This commit is contained in:
ed
2022-10-21 18:47:48 +02:00
parent 81d896be9f
commit 20eeacaac3
13 changed files with 418 additions and 43 deletions

View File

@@ -9,6 +9,8 @@ python3 ../scripts/strip_hints/a.py
pids=()
for py in python{2,3}; do
[ ${1:0:6} = python ] && [ $1 != $py ] && continue
PYTHONPATH=
[ $py = python2 ] && PYTHONPATH=../scripts/py2
export PYTHONPATH

View File

@@ -11,6 +11,7 @@ copyparty/broker_mp.py,
copyparty/broker_mpw.py,
copyparty/broker_thr.py,
copyparty/broker_util.py,
copyparty/dxml.py,
copyparty/fsutil.py,
copyparty/ftpd.py,
copyparty/httpcli.py,

View File

@@ -144,11 +144,11 @@ def tc1(vflags):
files={"f": (d.replace("/", "") + ".h264", vid)},
)
c = r.status_code
if c == 200 and p not in ["w", "rw"]:
if c == 201 and p not in ["w", "rw"]:
raise Exception("post {} with perm {} at {}".format(c, p, d))
elif c == 403 and p not in ["r"]:
raise Exception("post {} with perm {} at {}".format(c, p, d))
elif c not in [200, 403]:
elif c not in [201, 403]:
raise Exception("post {} with perm {} at {}".format(c, p, d))
cpp.clean()