1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

add option to log bad PUT request content

This commit is contained in:
Peter Bieringer 2024-05-29 06:07:36 +02:00
parent 96b63ed65f
commit 4678612194
4 changed files with 10 additions and 0 deletions

View file

@ -146,6 +146,8 @@ class ApplicationPartPut(ApplicationBase):
except Exception as e:
logger.warning(
"Bad PUT request on %r (read_components): %s", path, e, exc_info=True)
if self._bad_put_request_content:
logger.warning("Bad PUT request content of %r:\n%s", path, content)
return httputils.BAD_REQUEST
(prepared_items, prepared_tag, prepared_write_whole_collection,
prepared_props, prepared_exc_info) = prepare(