Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c3b384

Browse files
committed
Patch by Jeff Rush:
In SimpleHTTPServer.py, the server specified in test() should be BaseHTTPServer.HTTPServer, in case the request handler should want to reference the two attributes added by BaseHTTPServer.server_bind: self.server_name = hostname self.server_port = port There was some Bobo CGI code that wanted access to those attributes.
1 parent 9228cbd commit 5c3b384

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/SimpleHTTPServer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def guess_type(self, path):
148148

149149

150150
def test(HandlerClass = SimpleHTTPRequestHandler,
151-
ServerClass = SocketServer.TCPServer):
151+
ServerClass = BaseHTTPServer.HTTPServer):
152152
BaseHTTPServer.test(HandlerClass, ServerClass)
153153

154154

0 commit comments

Comments
 (0)