diff options
author | Matthew Hodgson <matthew@matrix.org> | 2016-03-31 01:55:21 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2016-03-31 01:55:21 +0100 |
commit | a8a5dd3b44a4526307502bd621ee0bd43c87c77f (patch) | |
tree | 131834f160f29c89a9ec68b6143de149d6d49273 /synapse/rest/media | |
parent | spell out more packages (diff) | |
download | synapse-a8a5dd3b44a4526307502bd621ee0bd43c87c77f.tar.xz |
handle requests with missing content-length headers (e.g. YouTube)
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py index b999944e86..ca2529cc10 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -19,7 +19,7 @@ from twisted.web.server import NOT_DONE_YET from twisted.internet import defer from lxml import html from synapse.util.stringutils import random_string -from synapse.http.client import SimpleHttpClient +from synapse.http.client import SpiderHttpClient from synapse.http.server import request_handler, respond_with_json, respond_with_json_bytes import os @@ -33,7 +33,7 @@ class PreviewUrlResource(BaseMediaResource): def __init__(self, hs, filepaths): BaseMediaResource.__init__(self, hs, filepaths) - self.client = SimpleHttpClient(hs) + self.client = SpiderHttpClient(hs) def render_GET(self, request): self._async_render_GET(request) |