summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 356fa5f)
raw | patch | inline | side by side (parent: 356fa5f)
author | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 30 Nov 2009 21:17:14 +0000 (21:17 +0000) | ||
committer | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 30 Nov 2009 21:17:14 +0000 (21:17 +0000) |
- 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
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4394 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/roundupdb.py | patch | blob | history | |
roundup/scripts/roundup_server.py | patch | blob | history |
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index 570c767e49e0bd7bc6a00ac18dfb98876f68cce8..9e241e9309e1516aa3ab46406f5b21066cf30999 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
""" 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.
"""
index 2e26218fe0b6930312661465dcdd056e776872e7..266edb9312c588c6c06e6b0d4489726a380f8677 100644 (file)
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')