Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: net/tools/testserver/testserver.py

Issue 8015004: webRequest.onAuthRequired listeners can provide authentication credentials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle multiple blocking onAuthRequired Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index cc66ffd3aee02960f98bab897898022c4e5e5924..2ba029fcd01e111e7067bf59a4b394623ea1ff5c 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -980,11 +980,13 @@ class TestPageHandler(BasePageHandler):
auth = self.headers.getheader('authorization')
try:
if not auth:
+ print "No Auth"
raise Exception('no auth')
b64str = re.findall(r'Basic (\S+)', auth)[0]
userpass = base64.b64decode(b64str)
username, password = re.findall(r'([^:]+):(\S+)', userpass)[0]
if password != expected_password:
+ print "Wrong Password, given %s" % password
raise Exception('wrong password')
except Exception, e:
# Authentication failed.

Powered by Google App Engine
This is Rietveld 408576698