23 lines
428 B
Python
23 lines
428 B
Python
|
#!/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()
|
||
|
|