summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-09-20 20:14:34 +1000
committerGitHub <noreply@github.com>2018-09-20 20:14:34 +1000
commit1f3f5fcf52efdf5215dc6c7cd3805b1357bf8236 (patch)
tree0ea1a5b02e4f0659e92b40ea450af96d8a6ab702 /synapse/http
parentMerge pull request #3914 from matrix-org/erikj/remove_retry_cache (diff)
downloadsynapse-1f3f5fcf52efdf5215dc6c7cd3805b1357bf8236.tar.xz
Fix client IPs being broken on Python 3 (#3908)
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/site.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py
index d41d672934..50be2de3bb 100644
--- a/synapse/http/site.py
+++ b/synapse/http/site.py
@@ -308,7 +308,7 @@ class XForwardedForRequest(SynapseRequest):
             C{b"-"}.
         """
         return self.requestHeaders.getRawHeaders(
-            b"x-forwarded-for", [b"-"])[0].split(b",")[0].strip()
+            b"x-forwarded-for", [b"-"])[0].split(b",")[0].strip().decode('ascii')
 
 
 class SynapseRequestFactory(object):