[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Fix a bug inside of HTTP test template
commit 98bb2cf5b556d54fd68859928c7e5bc4882a205d
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Mon Jan 6 00:22:20 2014 +0100
Fix a bug inside of HTTP test template
---
ooni/templates/httpt.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py
index fdcbc3e..7c54782 100644
--- a/ooni/templates/httpt.py
+++ b/ooni/templates/httpt.py
@@ -232,13 +232,9 @@ class HTTPTest(NetTestCase):
try:
content_length = int(response.headers.getRawHeaders('content-length')[0])
- except IndexError:
+ except Exception:
content_length = None
- if not content_length:
- self._processResponseBody(None, request, response, None)
- return defer.succeed(None)
-
finished = defer.Deferred()
response.deliverBody(BodyReceiver(finished, content_length))
finished.addCallback(self._processResponseBody, request,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits