Static httpd: by default, disable. Sample config.

bzr revid: p_christ@hol.gr-20100726093335-m6kfvk8xn2c6ddrh
This commit is contained in:
P. Christeas 2010-07-26 12:33:35 +03:00
parent 0ee47f021c
commit 9613c0c864
2 changed files with 6 additions and 2 deletions

View File

@ -279,7 +279,7 @@ class StaticHTTPHandler(HttpLogHandler, HTTPHandler):
def __init__(self,request, client_address, server):
HTTPHandler.__init__(self,request,client_address,server)
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
def translate_path(self, path):
@ -303,7 +303,7 @@ class StaticHTTPHandler(HttpLogHandler, HTTPHandler):
return path
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
dir_path = tools.config.get_misc('static-http', 'dir_path', False)

View File

@ -25,3 +25,7 @@ translate_modules = ['all']
demo = {}
addons_path = None
reportgz = False
[static-http]
enable = False
dir_path = /var/www/html