Skip to content

Instantly share code, notes, and snippets.

@peterkaminski
peterkaminski / webmsg.py
Last active July 9, 2019 18:06 — forked from bxt/webmsg.py
Really simple python web server to serve a maintenance message to the web
# forked from https://gist.github.com/bxt/3491401
import string,cgi,time, datetime
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self):
try:
self.send_response(503) # let bots know whats up
self.send_header('Content-type','text/html')
self.end_headers()