From 2b2c417b1be3fe490ff8323bfe1518dfaea8e526 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Wed, 10 Dec 2025 18:11:20 +0100 Subject: [PATCH] implement log of response header --- radicale/app/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index 98123cd6..fc7e1981 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -262,6 +262,11 @@ class Application(ApplicationPartDelete, ApplicationPartHead, # Add extra headers set in configuration headers.update(self._extra_headers) + if self._response_header_on_debug: + logger.debug("Response header:\n%s", utils.textwrap_str(pprint.pformat(headers))) + else: + logger.debug("Response header: suppressed by config/option [logging] response_header_on_debug") + # Start response time_end = datetime.datetime.now() time_delta_seconds = (time_end - time_begin).total_seconds()