GaeProxyHandler的基类是BaseHTTPRequestHandler,所以代码可以写成BaseHTTPRequestHandler
如果要运行代理,则应运行以下代码:
server = LocalProxyServer((common.LISTEN_IP, common.LISTEN_PORT), GAEProxyHandler)
server.serve_forever()
所以你知道服务器本身现在可能会编写关于调用方法 do_CONNECT 的代码。
让我们看看回溯,它确实如此。
File "E:\Python33\lib\threading.py", line 616, in _bootstrap
self._bootstrap_inner()
File "E:\Python33\lib\threading.py", line 639, in _bootstrap_inner
self.run()
File "E:\Python33\lib\threading.py", line 596, in run
self._target(*self._args, **self._kwargs)
File "E:\Python33\lib\socketserver.py", line 610, in process_request_thread
self.finish_request(request, client_address)
File "E:\Python33\lib\socketserver.py", line 345, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "E:\Python33\lib\socketserver.py", line 666, in __init__
self.handle()
File "E:\Python33\lib\http\server.py", line 400, in handle
self.handle_one_request()
File "E:\Python33\lib\http\server.py", line 388, in handle_one_request
method()
File "E:\eclipse\workspace\GoAgent\src\goagent-local\proxy.py", line 1758, in **do_CONNECT**
看到最后一个do_CONNECT了吗?