Skip to content
Snippets Groups Projects
Commit a9fd11ffa13f authored by kiilerix's avatar kiilerix
Browse files

serve: remove connection close hack for Python 2.3

Introduced in 276de216d2c5 and no longer needed - BaseHTTPServer handles
connection closing just fine if we don't mess with its internals.
parent e33b9b92a200
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,6 @@
SocketServer.ForkingMixIn)
env['wsgi.run_once'] = 0
self.close_connection = True
self.saved_status = None
self.saved_headers = []
self.sent_headers = False
......@@ -154,8 +153,5 @@
self.length = int(h[1])
# The value of the Connection header is a list of case-insensitive
# tokens separated by commas and optional whitespace.
if 'close' in [token.strip().lower() for token in
self.headers.get('connection', '').split(',')]:
should_close = True
if should_close:
self.send_header('Connection', 'close')
......@@ -160,6 +156,5 @@
if should_close:
self.send_header('Connection', 'close')
self.close_connection = should_close
self.end_headers()
self.sent_headers = True
......
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