diff --git a/bottle.py b/bottle.py index 97a56d3e..2c1f0248 100755 --- a/bottle.py +++ b/bottle.py @@ -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: