Skip to content

Commit 4c26676

Browse files
author
Alexander Smishlajev
committed
HTTP_AUTHORIZATION may be not present in environment
1 parent da56e37 commit 4c26676

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roundup/cgi/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.202 2004-11-18 16:21:07 a1s Exp $
1+
# $Id: client.py,v 1.203 2004-11-20 17:46:24 a1s Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -379,7 +379,7 @@ def determine_user(self):
379379
user = 'anonymous'
380380

381381
# try handling Basic Auth ourselves
382-
if (user == 'anonymous') and self.env['HTTP_AUTHORIZATION']:
382+
if (user == 'anonymous') and self.env.get('HTTP_AUTHORIZATION', ''):
383383
scheme, challenge = self.env['HTTP_AUTHORIZATION'].split(' ', 1)
384384
if scheme.lower() == 'basic':
385385
try:

0 commit comments

Comments
 (0)