summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-03-04 18:15:07 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-03-12 16:24:50 +0000
commite9c4b0d1789fca9cdefb53c75defa19a8ea62473 (patch)
treeef07bf1009baf0bc1a205ff411ab032b8036d7a3
parentImplement vector CallbackMetrics (diff)
downloadsynapse-e9c4b0d1789fca9cdefb53c75defa19a8ea62473.tar.xz
Ensure that /_synapse/metrics response is UTF-8 encoded
-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()