我有以下简单的线程文件服务器供我的应用程序使用:
class FileServer(Thread):
"""Simple file server exposing the current directory for the thumbnail
creator
"""
def __init__(self, port):
Thread.__init__(self)
self.port = port
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
self.httpd = SocketServer.TCPServer(("", port), Handler)
def run(self):
self.httpd.serve_forever()
def stop(self):
self.httpd.shutdown()
如何防止 SimpleHTTPServer 在每次请求时输出“GET 'http://BLA BLA BLA”?谢谢