Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Delta Between Two Patch Sets: Lib/http/server.py

Issue 26404: socketserver context manager
Left Patch Set: Created 3 years, 12 months ago
Right Patch Set: Created 3 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 """HTTP server classes. 1 """HTTP server classes.
2 2
3 Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see 3 Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see
4 SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST, 4 SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST,
5 and CGIHTTPRequestHandler for CGI scripts. 5 and CGIHTTPRequestHandler for CGI scripts.
6 6
7 It does, however, optionally implement HTTP/1.1 persistent connections, 7 It does, however, optionally implement HTTP/1.1 persistent connections,
8 as of version 0.3. 8 as of version 0.3.
9 9
10 Notes on CGIHTTPRequestHandler 10 Notes on CGIHTTPRequestHandler
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 parser.add_argument('port', action='store', 1193 parser.add_argument('port', action='store',
1194 default=8000, type=int, 1194 default=8000, type=int,
1195 nargs='?', 1195 nargs='?',
1196 help='Specify alternate port [default: 8000]') 1196 help='Specify alternate port [default: 8000]')
1197 args = parser.parse_args() 1197 args = parser.parse_args()
1198 if args.cgi: 1198 if args.cgi:
1199 handler_class = CGIHTTPRequestHandler 1199 handler_class = CGIHTTPRequestHandler
1200 else: 1200 else:
1201 handler_class = SimpleHTTPRequestHandler 1201 handler_class = SimpleHTTPRequestHandler
1202 test(HandlerClass=handler_class, port=args.port, bind=args.bind) 1202 test(HandlerClass=handler_class, port=args.port, bind=args.bind)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+