[tor-commits] [ooni-probe/master] Fix bug inside of BodyProducer code

art at torproject.org art at torproject.org
Sat Jan 4 16:56:27 UTC 2014


commit 510e51f8fb4dfde4d445264f40a8353394b97b1a
Author: Arturo Filastò <art at fuffa.org>
Date:   Sat Jan 4 16:55:48 2014 +0100

    Fix bug inside of BodyProducer code
---
 ooni/utils/net.py |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ooni/utils/net.py b/ooni/utils/net.py
index 845cf4c..1cc1046 100644
--- a/ooni/utils/net.py
+++ b/ooni/utils/net.py
@@ -65,6 +65,8 @@ class BodyReceiver(protocol.Protocol):
     def __init__(self, finished, content_length=None, body_processor=None):
         self.finished = finished
         self.data = ""
+        if content_length:
+            content_length = int(content_length[0])
         self.bytes_remaining = content_length
         self.body_processor = body_processor
 





More information about the tor-commits mailing list