1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

fix/adjustment reported by test

This commit is contained in:
Peter Bieringer 2024-05-29 06:19:00 +02:00
parent 496b9f1d7c
commit fb7630f9eb
2 changed files with 2 additions and 1 deletions

View file

@ -49,6 +49,7 @@ class ApplicationBase:
self._rights = rights.load(configuration) self._rights = rights.load(configuration)
self._web = web.load(configuration) self._web = web.load(configuration)
self._encoding = configuration.get("encoding", "request") self._encoding = configuration.get("encoding", "request")
self._log_bad_put_request_content = configuration.get("logging", "bad_put_request_content")
self._hook = hook.load(configuration) self._hook = hook.load(configuration)
def _read_xml_request_body(self, environ: types.WSGIEnviron def _read_xml_request_body(self, environ: types.WSGIEnviron

View file

@ -147,7 +147,7 @@ class ApplicationPartPut(ApplicationBase):
except Exception as e: except Exception as e:
logger.warning( logger.warning(
"Bad PUT request on %r (read_components): %s", path, e, exc_info=True) "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) logger.warning("Bad PUT request content of %r:\n%s", path, content)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
(prepared_items, prepared_tag, prepared_write_whole_collection, (prepared_items, prepared_tag, prepared_write_whole_collection,