summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-04-03 00:31:57 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-04-03 00:31:57 +0100
commit7426c86eb88a7abef9af7ba544ccd709b25e8304 (patch)
tree0918f85c6b04c606c3a5a50abd9371e5c4adeed8 /synapse/http
parentsupport gzip compression, and don't pass through error msgs (diff)
downloadsynapse-7426c86eb88a7abef9af7ba544ccd709b25e8304.tar.xz
add a persistent cache of URL lookups, and fix up the in-memory one to work
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py
index b21bf17378..f42a36ffa6 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -251,8 +251,8 @@ class SimpleHttpClient(object):
             url (str): The URL to GET
             output_stream (file): File to write the response body to.
         Returns:
-            A (int,dict) tuple of the file length and a dict of the response
-            headers.
+            A (int,dict,string,int) tuple of the file length, dict of the response
+            headers, absolute URI of the response and HTTP response code.
         """
 
         response = yield self.request(
@@ -287,7 +287,7 @@ class SimpleHttpClient(object):
             logger.exception("Failed to download body")
             raise
 
-        defer.returnValue((length, headers, response.request.absoluteURI))
+        defer.returnValue((length, headers, response.request.absoluteURI, response.code))
 
 
 # XXX: FIXME: This is horribly copy-pasted from matrixfederationclient.