diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 21:41:31 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 21:41:31 +0000 |
commit | b89ca03de8ef4f30169d72d3120ee291481d5964 (patch) | |
tree | e67f8a5956242cc4498ca374870ee0a839bef775 /third_party | |
parent | a72c6bb647954c92109a57b3edbb789195edda57 (diff) | |
download | chromium_src-b89ca03de8ef4f30169d72d3120ee291481d5964.zip chromium_src-b89ca03de8ef4f30169d72d3120ee291481d5964.tar.gz chromium_src-b89ca03de8ef4f30169d72d3120ee291481d5964.tar.bz2 |
Speed up net_unittests by re-using one FTP test server instance.
I managed to save 30s with this change!
I had to change the interface of the test server a bit. Now the credentials
to be used are passed (optionally) for TestPage request, not in the ctor.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/182031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/pyftpdlib/README.chromium | 6 | ||||
-rw-r--r-- | third_party/pyftpdlib/chromium.patch | 23 | ||||
-rw-r--r-- | third_party/pyftpdlib/pyftpdlib/ftpserver.py | 8 |
3 files changed, 31 insertions, 6 deletions
diff --git a/third_party/pyftpdlib/README.chromium b/third_party/pyftpdlib/README.chromium index a36b118..6415902 100644 --- a/third_party/pyftpdlib/README.chromium +++ b/third_party/pyftpdlib/README.chromium @@ -1,5 +1,9 @@ This library was downloaded from http://code.google.com/p/pyftpdlib/ +Chromium-specific changes are in chromium.patch file. Currently it removes the +delay after invalid login (which helps protect against brute-force attacks), +which is slowing down some tests. + For licensing information please LICENSE file Python FTP server library provides an high-level portable interface to easily @@ -9,4 +13,4 @@ available for Python programming language. Version: 0.5.0 -Learn more by visiting: http://code.google.com/p/pyftpdlib/wiki/FAQ
\ No newline at end of file +Learn more by visiting: http://code.google.com/p/pyftpdlib/wiki/FAQ diff --git a/third_party/pyftpdlib/chromium.patch b/third_party/pyftpdlib/chromium.patch new file mode 100644 index 0000000..43a74c2 --- /dev/null +++ b/third_party/pyftpdlib/chromium.patch @@ -0,0 +1,23 @@ +--- pyftpdlib/ftpserver.py ++++ pyftpdlib/ftpserver.py +@@ -2546,14 +2546,12 @@ class FTPHandler(asynchat.async_chat): + self.fs.root = self.authorizer.get_home_dir(self.username) + self.log("User %s logged in." %self.username) + else: +- CallLater(5, auth_failed) ++ auth_failed() + self.username = "" +- self.sleeping = True + # wrong username + else: + if self.username.lower() == 'anonymous': +- CallLater(5, auth_failed, "Anonymous access not allowed.") ++ auth_failed("Anonymous access not allowed.") + else: +- CallLater(5, auth_failed) ++ auth_failed() + self.username = "" +- self.sleeping = True + + def ftp_REIN(self, line): + """Reinitialize user's current session.""" diff --git a/third_party/pyftpdlib/pyftpdlib/ftpserver.py b/third_party/pyftpdlib/pyftpdlib/ftpserver.py index d273f84..d48f010 100644 --- a/third_party/pyftpdlib/pyftpdlib/ftpserver.py +++ b/third_party/pyftpdlib/pyftpdlib/ftpserver.py @@ -2546,17 +2546,15 @@ class FTPHandler(asynchat.async_chat): self.fs.root = self.authorizer.get_home_dir(self.username) self.log("User %s logged in." %self.username) else: - CallLater(5, auth_failed) + auth_failed() self.username = "" - self.sleeping = True # wrong username else: if self.username.lower() == 'anonymous': - CallLater(5, auth_failed, "Anonymous access not allowed.") + auth_failed("Anonymous access not allowed.") else: - CallLater(5, auth_failed) + auth_failed() self.username = "" - self.sleeping = True def ftp_REIN(self, line): """Reinitialize user's current session.""" |