[or-cvs] [torflow/master 78/92] soat_tester: Added HTTPRedirectTester

mikeperry at torproject.org mikeperry at torproject.org
Sat Aug 21 05:14:01 UTC 2010


Author: John M. Schanck <john at anomos.info>
Date: Sat, 14 Aug 2010 22:55:21 -0400
Subject: soat_tester: Added HTTPRedirectTester
Commit: 587369cacd80f354143fc6b0a9836bc2442db6f5

---
 NetworkScanners/ExitAuthority/test/soat_tester.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/NetworkScanners/ExitAuthority/test/soat_tester.py b/NetworkScanners/ExitAuthority/test/soat_tester.py
index d4fa6ab..222f736 100644
--- a/NetworkScanners/ExitAuthority/test/soat_tester.py
+++ b/NetworkScanners/ExitAuthority/test/soat_tester.py
@@ -72,6 +72,12 @@ class HTTPTester(BaseHTTPRequestHandler, Tester):
     self.end_headers()
     self.wfile.write(TOR_RESP)
 
+class HTTPRedirectTester(BaseHTTPRequestHandler, HTTPTester):
+  def tor_GET(self):
+    self.send_response(302)
+    self.send_header("Location", "torproject.org")
+    self.end_headers()
+    self.wfile.write(TOR_RESP)
 
 class HTTPSTester(HTTPTester):
   server=SSLServer
-- 
1.7.1




More information about the tor-commits mailing list