summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-04-02 03:06:39 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-04-02 03:06:39 +0100
commitd1b154a10fc0f71fb36010f784ca6570f845c8d5 (patch)
tree7c92377a4bd98883200bea1150bb63bab50ec910 /synapse/rest
parenthow was _respond_default_thumbnail ever meant to work? (diff)
downloadsynapse-d1b154a10fc0f71fb36010f784ca6570f845c8d5.tar.xz
support gzip compression, and don't pass through error msgs
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index 3ffdafce09..162e09ba71 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -200,7 +200,7 @@ class PreviewUrlResource(BaseMediaResource):
                     og["og:image:height"] = dims['height']
                 else:
                     logger.warn("Couldn't get dims for %s" % og["og:image"])
-                    
+
                 og["og:image"] = "mxc://%s/%s" % (self.server_name, image_info['filesystem_id'])
                 og["og:image:type"] = image_info['media_type']
             else:
@@ -259,7 +259,8 @@ class PreviewUrlResource(BaseMediaResource):
                 length, headers, uri = yield self.client.get_file(
                     url, output_stream=f, max_size=self.max_spider_size,
                 )
-                # FIXME: handle 404s sanely - don't spider an error page
+                # FIXME: pass through 404s and other error messages nicely
+
             media_type = headers["Content-Type"][0]
             time_now_ms = self.clock.time_msec()