gecko-dev/testing/mochitest/server.py

15 строки
348 B
Python

import SimpleHTTPServer
import SocketServer
# minimal web server. serves files relative to the
# current directory.
PORT = 8888
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
Handler.extensions_map[".xhtml"] = "application/xhtml+xml"
httpd = SocketServer.TCPServer(("", PORT), Handler)
print "serving at port", PORT
httpd.serve_forever()