tests/dumbhttp.py
changeset 29566 075146e85bb6
parent 28771 9366b18ba103
child 30515 d9d8d78e6bc9
--- a/tests/dumbhttp.py	Fri Jul 15 23:00:31 2016 +0530
+++ b/tests/dumbhttp.py	Wed Jul 13 23:38:29 2016 +0530
@@ -6,24 +6,24 @@
 Small and dumb HTTP server for use in tests.
 """
 
-import BaseHTTPServer
-import SimpleHTTPServer
 import optparse
 import signal
 import sys
 
 from mercurial import (
     cmdutil,
+    util,
 )
 
+httpserver = util.httpserver
 OptionParser = optparse.OptionParser
 
 class simplehttpservice(object):
     def __init__(self, host, port):
         self.address = (host, port)
     def init(self):
-        self.httpd = BaseHTTPServer.HTTPServer(
-            self.address, SimpleHTTPServer.SimpleHTTPRequestHandler)
+        self.httpd = httpserver.httpserver(
+            self.address, httpserver.simplehttprequesthandler)
     def run(self):
         self.httpd.serve_forever()