[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Add test that will prepend newline to request



commit dd314cc0a0beba5233084358ae8d493f3731d956
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Wed Jan 30 23:31:49 2013 +0100

    Add test that will prepend newline to request
---
 nettests/manipulation/http_host.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/nettests/manipulation/http_host.py b/nettests/manipulation/http_host.py
index 3e0996a..1665992 100644
--- a/nettests/manipulation/http_host.py
+++ b/nettests/manipulation/http_host.py
@@ -35,6 +35,7 @@ class HTTPHost(httpt.HTTPTest):
     author = "Arturo Filastò"
     version = "0.2.1"
 
+    randomizeUA = False
     usageOptions = UsageOptions
 
     inputFile = ['file', 'f', None,
@@ -42,6 +43,12 @@ class HTTPHost(httpt.HTTPTest):
 
     requiredOptions = ['backend']
 
+    def test_filtering_prepend_newline_to_method(self):
+        headers = {}
+        headers["Host"] = [self.input]
+        return self.doRequest('http://'+self.input, method="\nGET",
+                headers=headers)
+
     def test_filtering_add_tab_to_host(self):
         headers = {}
         headers["Host"] = [self.input + '\t']



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits