diff --git a/flask_httpauth.py b/flask_httpauth.py index 5cfcf40..55ec468 100644 --- a/flask_httpauth.py +++ b/flask_httpauth.py @@ -84,7 +84,10 @@ def decorated(*args, **kwargs): else: password = None if not self.authenticate(auth, password): + # Clear TCP receive buffer of any pending data + request.data return self.auth_error_callback() + return f(*args, **kwargs) return decorated