#!/usr/bin/python
import BaseHTTPServer, SimpleHTTPServer
import ssl
    
def run(args):
    httpd = BaseHTTPServer.HTTPServer((args.hostname, args.port), SimpleHTTPServer.SimpleHTTPRequestHandler)
    httpd.socket = ssl.wrap_socket(httpd.socket, certfile=args.cert, server_side=True)
    name, addr = httpd.socket.getsockname()
    print("Serving HTTPS on {} port {}...".format(name, addr))
    httpd.serve_forever()

if __name__ == '__main__':
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument("--hostname", default="localhost")
    parser.add_argument("--port", type=int, default=443)
    parser.add_argument("--cert", default="server.pem")

    args = parser.parse_args()
    
    run(args)

@@ -15,19 +15,207 @@
 hon%0A
+try:%0A    # Python 2 version%0A    from BaseHTTPServer import HTTPServer%0A    from SimpleHTTPServer import SimpleHTTPRequestHandler%0Aexcept ImportError:%0A    # Python 3 version%0A    from http.server 
 import 
-Base
 HTTP
@@ -232,23 +232,32 @@
 mpleHTTP
-Serv
+RequestHandl
 er%0A
+%0A
 import s
@@ -295,23 +295,8 @@
 d = 
-BaseHTTPServer.
 HTTP
@@ -334,25 +334,8 @@
 t), 
-SimpleHTTPServer.
 Simp

Update SimpleSecureHTTPServer for Python3