changeset 18353:a9fd11ffa13f

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.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 01:10:08 +0100
parents e33b9b92a200
children cf5c76017e11
files mercurial/hgweb/server.py
diffstat 1 files changed, 0 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Tue Jan 15 01:07:03 2013 +0100
+++ b/mercurial/hgweb/server.py	Tue Jan 15 01:10:08 2013 +0100
@@ -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,12 +153,8 @@
                 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')
-        self.close_connection = should_close
         self.end_headers()
         self.sent_headers = True