mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Use the internal decoder to log requests
This commit is contained in:
parent
3b17ed2969
commit
0328b2244b
1 changed files with 2 additions and 6 deletions
|
@ -186,12 +186,8 @@ class Application(object):
|
|||
|
||||
# Set content length
|
||||
if answer:
|
||||
if isinstance(answer, str):
|
||||
log_answer = answer
|
||||
else:
|
||||
# Decode the answer for logging purposes on Python 3
|
||||
log_answer = answer.decode(config.get("encoding", "request"))
|
||||
log.LOGGER.debug("Response content:\n%s" % log_answer)
|
||||
log.LOGGER.debug(
|
||||
"Response content:\n%s" % self.decode(answer, environ))
|
||||
headers["Content-Length"] = str(len(answer))
|
||||
|
||||
# Start response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue