Merge pull request #2473 from apache/infinite-loop-auth

Fix infinite loop in default_authentication_handler