Static httpd: by default, disable. Sample config.
authorP. Christeas <p_christ@hol.gr>
Mon, 26 Jul 2010 09:33:35 +0000 (12:33 +0300)
committerP. Christeas <p_christ@hol.gr>
Mon, 26 Jul 2010 09:33:35 +0000 (12:33 +0300)
bzr revid: p_christ@hol.gr-20100726093335-m6kfvk8xn2c6ddrh

bin/service/http_server.py
doc/openerp-server.conf

index e06fb34..2dfcf90 100644 (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)
index 3b58a00..ac15f2e 100644 (file)
@@ -25,3 +25,7 @@ translate_modules = ['all']
 demo = {}
 addons_path = None
 reportgz = False
+
+[static-http]
+enable = False
+dir_path = /var/www/html
\ No newline at end of file