fix accidental 422-ban when uploading lots of dupes

This commit is contained in:
ed 2023-09-08 19:49:29 +00:00
parent ba02c9cc12
commit 4364581705

View file

@ -629,7 +629,17 @@ class HttpCli(object):
headers: Optional[dict[str, str]] = None, headers: Optional[dict[str, str]] = None,
volsan: bool = False, volsan: bool = False,
) -> bytes: ) -> bytes:
if status > 400 and status in (403, 404, 422): if (
status > 400
and status in (403, 404, 422)
and (
status != 422
or (
not body.startswith(b"<pre>partial upload exists")
and not body.startswith(b"<pre>source file busy")
)
)
):
if status == 404: if status == 404:
g = self.conn.hsrv.g404 g = self.conn.hsrv.g404
elif status == 403: elif status == 403: