Use repr() for rfc2622 logging

This commit is contained in:
Florian Bruhin 2016-07-28 07:28:21 +02:00
parent 190db8bf5e
commit 016c13a998

View File

@ -47,7 +47,8 @@ def parse_content_disposition(reply):
# os.path.basename later.
try:
value = bytes(reply.rawHeader(content_disposition_header))
log.rfc6266.debug("Parsing Content-Disposition: {}".format(value))
log.rfc6266.debug("Parsing Content-Disposition: {!r}".format(
value))
content_disposition = rfc6266.parse_headers(value)
filename = content_disposition.filename()
except (SyntaxError, UnicodeDecodeError, rfc6266.Error):