Skip to content

Commit

Permalink
Merge pull request #587 from alicegoldfuss/issue_586
Browse files Browse the repository at this point in the history
Fix for Issue #586
  • Loading branch information
defnull committed Feb 12, 2014
2 parents 3320073 + 9889a7c commit 4429b7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bottle.py
Expand Up @@ -2544,6 +2544,7 @@ def auth_basic(check, realm="private", text="Access denied"):
''' Callback decorator to require HTTP auth (basic).
TODO: Add route(check_auth=...) parameter. '''
def decorator(func):
@functools.wraps(func)
def wrapper(*a, **ka):
user, password = request.auth or (None, None)
if user is None or not check(user, password):
Expand Down

0 comments on commit 4429b7f

Please sign in to comment.