mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 04:04:54 -04:00
make it work
This commit is contained in:
parent
dd4287ca5d
commit
64b4aead15
4 changed files with 80 additions and 57 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue