22 lines
428 B
Python
Executable file
22 lines
428 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import http.server as SimpleHTTPServer
|
|
import socketserver as SocketServer
|
|
import logging
|
|
|
|
PORT = 8000
|
|
|
|
class GetHandler(
|
|
SimpleHTTPServer.SimpleHTTPRequestHandler
|
|
):
|
|
|
|
def do_GET(self):
|
|
logging.error(self.headers)
|
|
SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
|
|
|
|
|
|
Handler = GetHandler
|
|
httpd = SocketServer.TCPServer(("", PORT), Handler)
|
|
|
|
httpd.serve_forever()
|
|
|