getting a strange error

This commit is contained in:
Mark McIntyre 2019-05-02 12:57:41 -04:00
parent 97694cfb3a
commit c76445b92f

View File

@ -19,8 +19,8 @@ WEB_DIR = '/tmp/web'
class SimpleHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
log.info(f"server version: {self.server_version}")
log.info(f"client address: {self.client_address}")
#log.info(f"server version: {self.server_version}")
#log.info(f"client address: {self.client_address}")
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
@ -94,8 +94,7 @@ if __name__ == "__main__":
simple_handler = SuperSimpleHandler() # http.server.SimpleHTTPRequestHandler
#with socketserver.TCPServer((args.ip_address, args.port), SockHandler) as tcpd:
with socketserver.TCPServer((args.ip_address, args.port), simple_hander) as tcpd:
with socketserver.TCPServer((args.ip_address, args.port), SockHandler) as tcpd:
log.info(f"Server started on {args.ip_address}:{args.port}")
tcpd.serve_forever()