Skip to content

Commit 2ab8c7c

Browse files
author
Ralf Schlatterbeck
committed
- small typo
- fix roundup_server if no host header is given in http request
1 parent 52c63c8 commit 2ab8c7c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

roundup/roundupdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def good_recipient(userid):
237237
""" Make sure we don't send mail to either the anonymous
238238
user or a user who has already seen the message.
239239
Also check permissions on the message if not a system
240-
message: A user must have view permisson on content and
240+
message: A user must have view permission on content and
241241
files to be on the receiver list. We do *not* check the
242242
author etc. for now.
243243
"""

roundup/scripts/roundup_server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,10 @@ def inner_run_cgi(self):
358358
env['SCRIPT_NAME'] = ''
359359
env['SERVER_NAME'] = self.server.server_name
360360
env['SERVER_PORT'] = str(self.server.server_port)
361-
env['HTTP_HOST'] = self.headers['host']
361+
try:
362+
env['HTTP_HOST'] = self.headers ['host']
363+
except KeyError:
364+
env['HTTP_HOST'] = ''
362365
if os.environ.has_key('CGI_SHOW_TIMING'):
363366
env['CGI_SHOW_TIMING'] = os.environ['CGI_SHOW_TIMING']
364367
env['HTTP_ACCEPT_LANGUAGE'] = self.headers.get('accept-language')

0 commit comments

Comments
 (0)