testing/mochitest/server.py
author sayrer@gmail.com
Mon, 23 Apr 2007 11:40:07 -0700
changeset 736 f04db18b1bc7b9c7bb9366bd93484ceedced7e43
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
bug 378487. allocator mismatch in SpanningCellSorter. r+sr=bzbarsky

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"
Handler.extensions_map[".svg"] = "image/svg+xml"
Handler.extensions_map[".xul"] = "application/vnd.mozilla.xul+xml"
httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()