def handler(apache_request): options = apache_request.get_options() config = options.get("ConfigFile", "/etc/tilecacheconfig.cfg") def run_mod_python(*args, **kwargs): return run(config, *args, **kwargs) return mod_python(run_mod_python, apache_request)
def handler(apacheReq): global theServer if not theServer: options = apacheReq.get_options() cfgs = cfgfiles if options.has_key("FeatureServerConfig"): cfgs = (options["FeatureServerConfig"], ) + cfgs theServer = Server.load(*cfgs) return mod_python(theServer.dispatchRequest, apacheReq)
def handler (apacheReq): global theServer if not theServer: options = apacheReq.get_options() cfgs = cfgfiles if options.has_key("FeatureServerConfig"): cfgs = (options["FeatureServerConfig"],) + cfgs theServer = Server.load(*cfgs) return mod_python(theServer.dispatchRequest, apacheReq)