testing/mochitest/server.py
author ted.mielczarek@gmail.com
Mon, 16 Jul 2007 14:00:26 -0700
changeset 3527 82217acf2a91b4c8076237352963a60278a6b61a
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
bug 388320 - package crashreporter xpt (+ rename airbag module to crashreporter). r=bsmedberg

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