From f4a553af6d86171d52cbb1b0f869bebc42a1f9a3 Mon Sep 17 00:00:00 2001 From: Yurii Zolot'ko Date: Tue, 23 Dec 2014 18:39:22 +0700 Subject: [PATCH] threading --- RangeHTTPServer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RangeHTTPServer.py b/RangeHTTPServer.py index 3819ff4..acd8ce5 100644 --- a/RangeHTTPServer.py +++ b/RangeHTTPServer.py @@ -31,6 +31,7 @@ __all__ = ["RangeHTTPRequestHandler"] +from SocketServer import ThreadingMixIn import os import posixpath import BaseHTTPServer @@ -267,7 +268,9 @@ def guess_type(self, path): def test(HandlerClass = RangeHTTPRequestHandler, ServerClass = BaseHTTPServer.HTTPServer): - BaseHTTPServer.test(HandlerClass, ServerClass) + class ThreadingServerClass(ThreadingMixIn, ServerClass): + pass + BaseHTTPServer.test(HandlerClass, ThreadingServerClass) if __name__ == '__main__':