def METHOD_NAME(self, path):
    for extn in [".log", ".tgen", ".cmd", ".env", ".cfg"]:
        if path.endswith(extn):
            return 'text/plain'
    return SimpleHTTPServer.SimpleHTTPRequestHandler.METHOD_NAME(self, path)