implement log of response header

This commit is contained in:
Peter Bieringer
2025-12-10 18:11:20 +01:00
parent a60e86671b
commit 2b2c417b1b

View File

@@ -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()