From c9f9f41c3e11a3cc816b85c6bc91e62c07250a12 Mon Sep 17 00:00:00 2001 From: schlatterbeck Date: Mon, 30 Nov 2009 21:17:14 +0000 Subject: [PATCH] - small typo - fix roundup_server if no host header is given in http request git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4394 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/roundupdb.py | 2 +- roundup/scripts/roundup_server.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 570c767..9e241e9 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -237,7 +237,7 @@ class IssueClass: """ Make sure we don't send mail to either the anonymous user or a user who has already seen the message. Also check permissions on the message if not a system - message: A user must have view permisson on content and + message: A user must have view permission on content and files to be on the receiver list. We do *not* check the author etc. for now. """ diff --git a/roundup/scripts/roundup_server.py b/roundup/scripts/roundup_server.py index 2e26218..266edb9 100644 --- a/roundup/scripts/roundup_server.py +++ b/roundup/scripts/roundup_server.py @@ -358,7 +358,10 @@ class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): env['SCRIPT_NAME'] = '' env['SERVER_NAME'] = self.server.server_name env['SERVER_PORT'] = str(self.server.server_port) - env['HTTP_HOST'] = self.headers['host'] + try: + env['HTTP_HOST'] = self.headers ['host'] + except KeyError: + env['HTTP_HOST'] = '' if os.environ.has_key('CGI_SHOW_TIMING'): env['CGI_SHOW_TIMING'] = os.environ['CGI_SHOW_TIMING'] env['HTTP_ACCEPT_LANGUAGE'] = self.headers.get('accept-language') -- 2.30.2