Skip to content

Instantly share code, notes, and snippets.

@jymcheong
Created September 27, 2017 08:13
Show Gist options
  • Save jymcheong/bf36e419df0e3d20e10b1e7aa823c612 to your computer and use it in GitHub Desktop.
Save jymcheong/bf36e419df0e3d20e10b1e7aa823c612 to your computer and use it in GitHub Desktop.
Quite python http server to serve ClickOnce deployment files
import SimpleHTTPServer
import SocketServer
PORT = 8000
class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
pass
Handler.extensions_map['.shtml'] = 'text/html'
Handler.extensions_map['.application'] = 'application/x-ms-application'
Handler.extensions_map['.manifest'] = 'application/x-ms-manifest'
Handler.extensions_map['.deploy'] = 'application/octet-stream'
Handler.extensions_map['.msp'] = 'application/octet-stream'
Handler.extensions_map['.msu'] = 'application/octet-stream'
Handler.extensions_map['.vsto'] = 'application/x-ms-vsto'
httpd = SocketServer.TCPServer(("", PORT), Handler)
httpd.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment