commit 59a9c96c81d5ac0e76808005fc4632a662be0666
Author: Arturo Filastò <art(a)fuffa.org>
Date: Fri Mar 7 17:03:24 2014 +0100
Initialize all report entries in http requests test
---
ooni/nettests/blocking/http_requests.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ooni/nettests/blocking/http_requests.py b/ooni/nettests/blocking/http_requests.py
index 790b554..17859f5 100644
--- a/ooni/nettests/blocking/http_requests.py
+++ b/ooni/nettests/blocking/http_requests.py
@@ -30,7 +30,7 @@ class HTTPRequestsTest(httpt.HTTPTest):
name = "HTTP Requests Test"
description = "Performs a HTTP GET request over Tor and one over the local network and compares the two results."
author = "Arturo Filastò"
- version = "0.2.3"
+ version = "0.2.4"
usageOptions = UsageOptions
@@ -56,6 +56,12 @@ class HTTPRequestsTest(httpt.HTTPTest):
self.factor = self.localOptions['factor']
self.report['control_failure'] = None
self.report['experiment_failure'] = None
+ self.report['body_length_match'] = None
+ self.report['body_proportion'] = None
+ self.report['factor'] = float(self.factor)
+ self.report['headers_diff'] = None
+ self.report['headers_match'] = None
+
self.headers = {'User-Agent': [random.choice(userAgents)]}
def compare_body_lengths(self, body_length_a, body_length_b):
@@ -71,7 +77,6 @@ class HTTPRequestsTest(httpt.HTTPTest):
rel = 1/rel
self.report['body_proportion'] = rel
- self.report['factor'] = float(self.factor)
if rel > float(self.factor):
log.msg("The two body lengths appear to match")
log.msg("censorship is probably not happening")