def _launch_http_server(self, port, root_path):
    # Twisted has a bug where it doesn't properly initialize mimetypes
    # This must be done before importing it
    import mimetypes
    mimetypes.init()

    from twisted.internet import reactor
    from twisted.web.resource import Resource, NoResource
    from twisted.web.server import Site
    from twisted.web.static import File

    # Special site handler that merges various output and input paths into a
    # single unifed file system
    class MergedSite(Site):
      def getResourceFor(self, request):
        # Scan well-known search paths first
        search_paths = ['build-out', 'build-gen',]
        for search_path in search_paths:
          resource = self.resource
          prepath = copy.copy(request.prepath)
          postpath = copy.copy(request.postpath)
          postpath.insert(0, search_path)
          while postpath and not resource.isLeaf:
            path_element = postpath.pop(0)
            prepath.append(path_element)
            resource = resource.getChildWithDefault(path_element, request)
          if resource and not isinstance(resource, NoResource):
            return resource
        # Fallback to normal handling
        return Site.getResourceFor(self, request)

    print 'Launching HTTP server on port %s...' % (port)

    root = File(root_path)
    factory = MergedSite(root)
    reactor.listenTCP(port, factory)
    reactor.run()
Returns names and descriptions of the schema "image"'s
dataset/ETHPy150Open google/anvil-build/anvil/commands/serve_command.py/ServeCommand._launch_http_server--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/glance.py/image_schema