1
0
Fork 0
dotfiles2000/dotfiles/my-binaries/dot-bin/server.py

23 lines
428 B
Python
Raw Normal View History

2024-10-31 22:09:39 +01:00
#!/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()