diff options
-rw-r--r-- | webtest/app.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/webtest/app.py b/webtest/app.py index 8110ed8..a0da8cf 100644 --- a/webtest/app.py +++ b/webtest/app.py @@ -204,6 +204,8 @@ class TestApp(object): val = ':'.join(list(val)) val = b64encode(to_bytes(val)).strip() val = val.decode('latin1') + elif authtype == 'Bearer' and val and isinstance(val, (str, unicode)): + val = val.strip() else: raise ValueError(invalid_value) value = str('%s %s' % (authtype, val)) |