'Version of send_head that support CGI scripts'

def send_head(self):

    if self.is_cgi():
        return self.run_cgi()
    else:
        return SimpleHTTPServer.SimpleHTTPRequestHandler.send_head(self)
