webdav: a healthy dash of paranoia

there's probably at least one client sending `Overwrite: False`
instead of the spec-correct `Overwrite: F`
This commit is contained in:
ed 2025-02-19 22:07:26 +00:00
parent e9f78ea70c
commit cb413bae49

View file

@ -1811,7 +1811,8 @@ class HttpCli(object):
dst = unquotep(dst) dst = unquotep(dst)
# overwrite=True is default; rfc4918 9.8.4 # overwrite=True is default; rfc4918 9.8.4
overwrite = self.headers.get("overwrite", "").lower() != "f" zs = self.headers.get("overwrite", "").lower()
overwrite = zs not in ["f", "false"]
try: try:
fun = self._cp if self.mode == "COPY" else self._mv fun = self._cp if self.mode == "COPY" else self._mv