[tor-commits] [ooni-probe/master] Fix a bug inside of HTTP test template

art at torproject.org art at torproject.org
Sun Jan 5 23:22:59 UTC 2014


commit 98bb2cf5b556d54fd68859928c7e5bc4882a205d
Author: Arturo Filastò <art at fuffa.org>
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,



More information about the tor-commits mailing list