summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/metrics/resource.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/metrics/resource.py b/synapse/metrics/resource.py
index 2b9a1ee0a9..ff7baab018 100644
--- a/synapse/metrics/resource.py
+++ b/synapse/metrics/resource.py
@@ -36,4 +36,5 @@ class MetricsResource(Resource):
         request.setHeader("Content-Type", "text/plain")
         request.setHeader("Content-Length", str(len(response)))
 
-        return response
+        # Encode as UTF-8 (default)
+        return response.encode()