code: def handle_static(environ, start_response, path):
      
      try:
          data = open(path, "rb").read()
          if path.endswith(".ico"):
              resp = Response(data, headers=[("Content-Type", "image/x-icon")])
          elif path.endswith(".html"):
              resp = Response(data, headers=[("Content-Type", "text/html")])
          elif path.endswith(".txt"):
              resp = Response(data, headers=[("Content-Type", "text/plain")])
          elif path.endswith(".css"):
              resp = Response(data, headers=[("Content-Type", "text/css")])
          elif path.endswith(".js"):
              resp = Response(data, headers=[("Content-Type", "text/javascript")])
          elif path.endswith(".png"):
              resp = Response(data, headers=[("Content-Type", "image/png")])
          else:
              resp = Response(data)
      except IOError:
          resp = NotFound()
      return resp(environ, start_response)
docs: Creates a response for a static file. There might be a longer path
      then just /static/... - if so strip the path leading up to static.
  
      :param environ: wsgi enviroment
      :param start_response: wsgi start response
      :param path: the static file and path to the file.
      :return: wsgi response for the static file.