summary refs log tree commit diff
path: root/synapse/http/matrixfederationclient.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-09-17 17:07:10 +0100
committerGitHub <noreply@github.com>2018-09-17 17:07:10 +0100
commitc7131baefc743aa664860dec08a0574df5f0e5be (patch)
tree60a8ecf8e0936ab55c7b2cee21ec7c91ac0743a7 /synapse/http/matrixfederationclient.py
parentREADME: run python_dependencies with -m (diff)
parentchangelog (diff)
downloadsynapse-c7131baefc743aa664860dec08a0574df5f0e5be.tar.xz
Merge pull request #3892 from matrix-org/rav/decode_bytes_in_request_logs
Fix some b'abcd' noise in logs and metrics
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r--synapse/http/matrixfederationclient.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 13b19f7626..083484a687 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -244,7 +244,10 @@ class MatrixFederationHttpClient(object):
                             request_deferred,
                         )
 
-                    log_result = "%d %s" % (response.code, response.phrase,)
+                    log_result = "%d %s" % (
+                        response.code,
+                        response.phrase.decode('ascii', errors='replace'),
+                    )
                     break
                 except Exception as e:
                     if not retry_on_dns_fail and isinstance(e, DNSLookupError):