diff options
author | Matthew Hodgson <matthew@matrix.org> | 2016-03-29 03:13:25 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2016-03-29 03:13:25 +0100 |
commit | 64b4aead15927be56d7433250462c03f2d1f4565 (patch) | |
tree | de735c74c600ff60d34e6c3f1cd19aca4d65709f /synapse/http/client.py | |
parent | make it build (diff) | |
download | synapse-64b4aead15927be56d7433250462c03f2d1f4565.tar.xz |
make it work
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index a735300db0..cfdea91b57 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -26,6 +26,7 @@ from twisted.web.client import ( Agent, readBody, FileBodyProducer, PartialDownloadError, ) from twisted.web.http_headers import Headers +from twisted.web._newclient import ResponseDone from StringIO import StringIO @@ -266,7 +267,7 @@ class SimpleHttpClient(object): headers = dict(response.headers.getAllRawHeaders()) - if headers['Content-Length'] > max_size: + if 'Content-Length' in headers and headers['Content-Length'] > max_size: logger.warn("Requested URL is too large > %r bytes" % (self.max_size,)) # XXX: do we want to explicitly drop the connection here somehow? if so, how? raise # what should we be raising here? |