Skip to content
Snippets Groups Projects
Commit 780120dc authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

DRTVWR-418: Remove ThreadingMixin from our HTTPServer subclass.

It's possible that raising an exception in a worker thread -- even though
we're TRYING to suppress it -- is what's causing the process to terminate with
nonzero rc.
parent bae76ec8
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
except ImportError: except ImportError:
from StringIO import StringIO from StringIO import StringIO
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from SocketServer import ThreadingMixIn
from llbase.fastest_elementtree import parse as xml_parse from llbase.fastest_elementtree import parse as xml_parse
from llbase import llsd from llbase import llsd
...@@ -274,7 +273,7 @@ def log_error(self, format, *args): ...@@ -274,7 +273,7 @@ def log_error(self, format, *args):
# Suppress error output as well # Suppress error output as well
pass pass
class Server(ThreadingMixIn, HTTPServer): class Server(HTTPServer):
# This pernicious flag is on by default in HTTPServer. But proper # This pernicious flag is on by default in HTTPServer. But proper
# operation of freeport() absolutely depends on it being off. # operation of freeport() absolutely depends on it being off.
allow_reuse_address = False allow_reuse_address = False
...@@ -284,8 +283,7 @@ class Server(ThreadingMixIn, HTTPServer): ...@@ -284,8 +283,7 @@ class Server(ThreadingMixIn, HTTPServer):
# to stderr which annoys some. Disable this override to get # to stderr which annoys some. Disable this override to get
# default behavior which *shouldn't* cause the program to return # default behavior which *shouldn't* cause the program to return
# a failure status. # a failure status.
if not VERBOSE: def handle_error(self, request, client_address):
def handle_error(self, request, client_address):
print '-'*40 print '-'*40
print 'Ignoring exception during processing of request from', print 'Ignoring exception during processing of request from',
print client_address print client_address
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment