[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Add extra checks in the body and header comparisons
commit 981329235f9b8e8629d993e63e1215dd94e4e0d7
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Mon Aug 18 16:49:54 2014 +0200
Add extra checks in the body and header comparisons
---
ooni/nettests/blocking/http_requests.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ooni/nettests/blocking/http_requests.py b/ooni/nettests/blocking/http_requests.py
index 625f34c..d37489e 100644
--- a/ooni/nettests/blocking/http_requests.py
+++ b/ooni/nettests/blocking/http_requests.py
@@ -131,8 +131,10 @@ class HTTPRequestsTest(httpt.HTTPTest):
control = measurement.result
if experiment and control:
- self.compare_body_lengths(len(control.body),
- len(experiment.body))
- self.compare_headers(control.headers,
- experiment.headers)
+ if experiment.body and control.body:
+ self.compare_body_lengths(len(control.body),
+ len(experiment.body))
+ if experiment.headers and control.headers:
+ self.compare_headers(control.headers,
+ experiment.headers)
return self.report
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits