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

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

Issue 201083: Cache login identity for NewFTP transactions. (Closed)
Patch Set: better Created 11 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 065ea7baf44df79a7e1aa8547343abe9083badc3..5411aea3517d7c6304914d2abf90674236ae2cfb 100644
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -1113,7 +1113,8 @@ def main(options, args):
# anonymous user
authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw')
- authorizer.add_anonymous(my_data_dir)
+ if options.ftp_enable_anonymous:
+ authorizer.add_anonymous(my_data_dir)
# Instantiate FTP handler class
ftp_handler = pyftpdlib.ftpserver.FTPHandler
@@ -1137,10 +1138,13 @@ def main(options, args):
if __name__ == '__main__':
option_parser = optparse.OptionParser()
- option_parser.add_option("-f", '--ftp', action='store_const',
+ option_parser.add_option('--ftp', action='store_const',
const=SERVER_FTP, default=SERVER_HTTP,
dest='server_type',
help='FTP or HTTP server default HTTP')
+ option_parser.add_option('--ftp-enable-anonymous', action='store_true',
eroman 2009/09/22 07:42:24 It might be more convenient to invert the directio
+ default=False, dest='ftp_enable_anonymous',
+ help='Enable anonymous FTP')
option_parser.add_option('--forking', action='store_true', default=False,
dest='forking',
help='Serve each request in a separate process')

Powered by Google App Engine
This is Rietveld 408576698