#!/usr/bin/env python
import SimpleHTTPServer
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
   def do_HEAD(self):
       self.path = self.path.replace('nightly', 'default')
       print('do_HEAD: ' + self.path)
       SimpleHTTPServer.SimpleHTTPRequestHandler.do_HEAD(self)
   def do_GET(self):
       self.path = self.path.replace('nightly', 'default')
       print('do_GET: ' + self.path)
       SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
   def end_headers(self):
       self.send_my_headers()
       SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self)
   def send_my_headers(self):
       self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
       self.send_header("Pragma", "no-cache")
       self.send_header("Expires", "0")
if __name__ == '__main__':
   SimpleHTTPServer.test(HandlerClass=MyHTTPRequestHandler)
