OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """This is a simple HTTP/FTP/SYNC/TCP/UDP/ server used for testing Chrome. | 6 """This is a simple HTTP/FTP/SYNC/TCP/UDP/ server used for testing Chrome. |
7 | 7 |
8 It supports several test URLs, as specified by the handlers in TestPageHandler. | 8 It supports several test URLs, as specified by the handlers in TestPageHandler. |
9 By default, it listens on an ephemeral port and sends the port number back to | 9 By default, it listens on an ephemeral port and sends the port number back to |
10 the originating process over a pipe. The originating process can specify an | 10 the originating process over a pipe. The originating process can specify an |
(...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2169 option_parser.add_option('', '--https', action='store_true', dest='https', | 2169 option_parser.add_option('', '--https', action='store_true', dest='https', |
2170 help='Specify that https should be used.') | 2170 help='Specify that https should be used.') |
2171 option_parser.add_option('', '--cert-and-key-file', dest='cert_and_key_file', | 2171 option_parser.add_option('', '--cert-and-key-file', dest='cert_and_key_file', |
2172 help='specify the path to the file containing the ' | 2172 help='specify the path to the file containing the ' |
2173 'certificate and private key for the server in PEM ' | 2173 'certificate and private key for the server in PEM ' |
2174 'format') | 2174 'format') |
2175 option_parser.add_option('', '--ocsp', dest='ocsp', default='ok', | 2175 option_parser.add_option('', '--ocsp', dest='ocsp', default='ok', |
2176 help='The type of OCSP response generated for the ' | 2176 help='The type of OCSP response generated for the ' |
2177 'automatically generated certificate. One of ' | 2177 'automatically generated certificate. One of ' |
2178 '[ok,revoked,invalid]') | 2178 '[ok,revoked,invalid]') |
2179 option_parser.add_option('', '--tls-intolerant', dest='tls_intolerant', | 2179 option_parser.add_option('', '--tls-intolerant', dest='tls_intolerant', |
wtc
2012/05/22 22:02:02
I am not familiar with Python. I found that if I
agl
2012/05/22 22:07:11
According to:
http://docs.python.org/library/optp
| |
2180 const=True, default=False, action='store_const', | 2180 default='0', type='int', |
2181 help='If true, TLS connections will be aborted ' | 2181 help='If nonzero, TLS connections will be aborted ' |
2182 ' in order to test SSLv3 fallback.') | 2182 ' in order to test version fallback. 1 means all' |
2183 ' TLS versions will be aborted. 2 means TLS 1.1' | |
2184 ' or higher will be aborted. 3 means TLS 1.2 or' | |
2185 ' higher will be aborted.') | |
2183 option_parser.add_option('', '--https-record-resume', dest='record_resume', | 2186 option_parser.add_option('', '--https-record-resume', dest='record_resume', |
2184 const=True, default=False, action='store_const', | 2187 const=True, default=False, action='store_const', |
2185 help='Record resumption cache events rather than' | 2188 help='Record resumption cache events rather than' |
2186 ' resuming as normal. Allows the use of the' | 2189 ' resuming as normal. Allows the use of the' |
2187 ' /ssl-session-cache request') | 2190 ' /ssl-session-cache request') |
2188 option_parser.add_option('', '--ssl-client-auth', action='store_true', | 2191 option_parser.add_option('', '--ssl-client-auth', action='store_true', |
2189 help='Require SSL client auth on every connection.') | 2192 help='Require SSL client auth on every connection.') |
2190 option_parser.add_option('', '--ssl-client-ca', action='append', default=[], | 2193 option_parser.add_option('', '--ssl-client-ca', action='append', default=[], |
2191 help='Specify that the client certificate request ' | 2194 help='Specify that the client certificate request ' |
2192 'should include the CA named in the subject of ' | 2195 'should include the CA named in the subject of ' |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2225 dest='host', | 2228 dest='host', |
2226 help='Hostname or IP upon which the server will ' | 2229 help='Hostname or IP upon which the server will ' |
2227 'listen. Client connections will also only be ' | 2230 'listen. Client connections will also only be ' |
2228 'allowed from this address.') | 2231 'allowed from this address.') |
2229 option_parser.add_option('', '--auth-token', dest='auth_token', | 2232 option_parser.add_option('', '--auth-token', dest='auth_token', |
2230 help='Specify the auth token which should be used' | 2233 help='Specify the auth token which should be used' |
2231 'in the authorization header for GData.') | 2234 'in the authorization header for GData.') |
2232 options, args = option_parser.parse_args() | 2235 options, args = option_parser.parse_args() |
2233 | 2236 |
2234 sys.exit(main(options, args)) | 2237 sys.exit(main(options, args)) |
OLD | NEW |