Skip to content

Commit

Permalink
nadle case when WSGIHeaderDict has None in values
Browse files Browse the repository at this point in the history
if key has None value then .get(key) throws an Exception

fixes bottlepy#1452
  • Loading branch information
Andrey-mp committed Sep 9, 2024
1 parent dd6be60 commit 3eb5ea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2307,7 +2307,7 @@ def raw(self, key, default=None):

def __getitem__(self, key):
val = self.environ[self._ekey(key)]
if py3k:
if val and py3k:
if isinstance(val, unicode):
val = val.encode('latin1').decode('utf8')
else:
Expand Down

0 comments on commit 3eb5ea9

Please sign in to comment.