diff --git a/radicale/app/base.py b/radicale/app/base.py index e9693d25..55e8e191 100644 --- a/radicale/app/base.py +++ b/radicale/app/base.py @@ -49,6 +49,7 @@ class ApplicationBase: self._rights = rights.load(configuration) self._web = web.load(configuration) self._encoding = configuration.get("encoding", "request") + self._log_bad_put_request_content = configuration.get("logging", "bad_put_request_content") self._hook = hook.load(configuration) def _read_xml_request_body(self, environ: types.WSGIEnviron diff --git a/radicale/app/put.py b/radicale/app/put.py index 1666bd29..d013c5d5 100644 --- a/radicale/app/put.py +++ b/radicale/app/put.py @@ -147,7 +147,7 @@ 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: + if self._log_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,