title: Python SimpleHttpServer, how to return files without extensions with plain/text mime type?
body: <p>I coded following simple http server in python, I have some files without an extension and want to serve them with "text/plain" mime type. How can I achieve it?</p>
  
  <pre><code>import SimpleHTTPServer
  import SocketServer
  
  PORT = 80
  
  class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
      pass
  
  Handler.extensions_map['.shtml'] = 'text/html'
  
  httpd = SocketServer.TCPServer(("", PORT), Handler)
  
  print "serving at port", PORT
  httpd.serve_forever()
  </code></pre>