Code

Ticket #16099: multithreaded-2.diff

File multithreaded-2.diff, 791 bytes (added by jturnbull, 3 years ago)

Patch dealign only with the chrome issue, cleanly applies

Line 
1Index: django/core/servers/basehttp.py
2===================================================================
3--- django/core/servers/basehttp.py     (revision 16404)
4+++ django/core/servers/basehttp.py     (working copy)
5@@ -14,6 +14,7 @@
6 import urllib
7 from wsgiref import simple_server
8 from wsgiref.util import FileWrapper   # for backwards compatibility
9+from SocketServer import ThreadingMixIn
10 
11 import django
12 from django.core.exceptions import ImproperlyConfigured
13@@ -69,7 +70,7 @@
14         return ['\n'.join(traceback.format_exception(*sys.exc_info()))]
15 
16 
17-class WSGIServer(simple_server.WSGIServer, object):
18+class WSGIServer(ThreadingMixIn, simple_server.WSGIServer, object):
19     """BaseHTTPServer that implements the Python WSGI protocol"""
20 
21     def __init__(self, *args, **kwargs):