summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
authorErik Johnston <lightportal@gmail.com>2014-08-24 11:56:55 +0100
committerErik Johnston <lightportal@gmail.com>2014-08-24 11:56:55 +0100
commit0c3b4a1f63413c4d3195a14ee4346a6d9cfdf618 (patch)
tree73d30c9aaa8c99a7f6ba18eb3f23b5521bb3d1b2 /synapse/http/server.py
parentAdd a unique constraint on the room hosts table (diff)
downloadsynapse-0c3b4a1f63413c4d3195a14ee4346a6d9cfdf618.tar.xz
For the content repo, don't just use homeserver.hostname as that might not include the port due to SRV.
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r--synapse/http/server.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index d1f99460c1..66f966fcaa 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -325,7 +325,9 @@ class ContentRepoResource(resource.Resource):
 
             # FIXME (erikj): These should use constants.
             file_name = os.path.basename(fname)
-            url = "http://%s/matrix/content/%s" % (self.hs.hostname, file_name)
+            url = "http://%s/matrix/content/%s" % (
+                self.hs.domain_with_port, file_name
+            )
 
             respond_with_json_bytes(request, 200,
                                     json.dumps({"content_token": url}),