testing/mochitest/server.py
author roc+@cs.cmu.edu
Tue, 29 May 2007 02:45:30 -0700
changeset 1938 2cf6bf8e3792adc54877ada0dd9bfb0fed805cc8
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 372970. Implement navigator.offlineResources. patch by Dave Camp, r+sr=jst

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()