From 0c3b4a1f63413c4d3195a14ee4346a6d9cfdf618 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Sun, 24 Aug 2014 11:56:55 +0100 Subject: For the content repo, don't just use homeserver.hostname as that might not include the port due to SRV. --- synapse/http/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'synapse/http/server.py') 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}), -- cgit 1.4.1