From 9613c0c8643c049876d7ca0c76db3a33bfdaa995 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Mon, 26 Jul 2010 12:33:35 +0300 Subject: [PATCH] Static httpd: by default, disable. Sample config. bzr revid: p_christ@hol.gr-20100726093335-m6kfvk8xn2c6ddrh --- bin/service/http_server.py | 4 ++-- doc/openerp-server.conf | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/service/http_server.py b/bin/service/http_server.py index e06fb344f2f..2dfcf90ba63 100644 --- a/bin/service/http_server.py +++ b/bin/service/http_server.py @@ -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) diff --git a/doc/openerp-server.conf b/doc/openerp-server.conf index 3b58a008329..ac15f2ef255 100644 --- a/doc/openerp-server.conf +++ b/doc/openerp-server.conf @@ -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