Project

General

Profile

« Previous | Next » 

Revision 6c69435c

Added by jahoti about 2 years ago

Support a custom certificates directory in test/server.py

View differences:

test/server.py
39 39
}
40 40

  
41 41
class RequestHijacker(ProxyRequestHandler):
42
	certdir = global_certdir
43
	
42 44
	def handle_request(self, req_body):
43 45
		path_components = self.path.split('?', maxsplit=1)
44 46
		path = path_components[0]
......
99 101
		
100 102

  
101 103

  
102
def do_an_internet(port=1337):
104
def do_an_internet(certdir, port):
103 105
	"""Start up the proxy/server"""
106
	global global_certdir
107
	global_certdir = certdir
104 108
	
105 109
	httpd = ThreadingHTTPServer(('', port), RequestHijacker)
106 110
	httpd.serve_forever()

Also available in: Unified diff