Static httpd: by default, disable. Sample config.
bzr revid: p_christ@hol.gr-20100726093335-m6kfvk8xn2c6ddrh
This commit is contained in:
parent
0ee47f021c
commit
9613c0c864
|
@ -279,7 +279,7 @@ class StaticHTTPHandler(HttpLogHandler, HTTPHandler):
|
||||||
def __init__(self,request, client_address, server):
|
def __init__(self,request, client_address, server):
|
||||||
HTTPHandler.__init__(self,request,client_address,server)
|
HTTPHandler.__init__(self,request,client_address,server)
|
||||||
dir_path = tools.config.get_misc('static-http', 'dir_path', False)
|
dir_path = tools.config.get_misc('static-http', 'dir_path', False)
|
||||||
assert dir_path
|
assert dir_path, "Please specify static-http/dir_path in config, or disable static-httpd!"
|
||||||
self.__basepath = dir_path
|
self.__basepath = dir_path
|
||||||
|
|
||||||
def translate_path(self, path):
|
def translate_path(self, path):
|
||||||
|
@ -303,7 +303,7 @@ class StaticHTTPHandler(HttpLogHandler, HTTPHandler):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def init_static_http():
|
def init_static_http():
|
||||||
if not tools.config.get_misc('static-http','enable', True):
|
if not tools.config.get_misc('static-http','enable', False):
|
||||||
return
|
return
|
||||||
|
|
||||||
dir_path = tools.config.get_misc('static-http', 'dir_path', False)
|
dir_path = tools.config.get_misc('static-http', 'dir_path', False)
|
||||||
|
|
|
@ -25,3 +25,7 @@ translate_modules = ['all']
|
||||||
demo = {}
|
demo = {}
|
||||||
addons_path = None
|
addons_path = None
|
||||||
reportgz = False
|
reportgz = False
|
||||||
|
|
||||||
|
[static-http]
|
||||||
|
enable = False
|
||||||
|
dir_path = /var/www/html
|
Loading…
Reference in New Issue