Skip to content

Commit

Permalink
Fix for Issue #586
Browse files Browse the repository at this point in the history
  • Loading branch information
alicegoldfuss committed Feb 12, 2014
1 parent 3320073 commit 9889a7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bottle.py
Original file line number Diff line number Diff line change
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 9889a7c

Please sign in to comment.