##// END OF EJS Templates
serve: remove connection close hack for Python 2.3...
Mads Kiilerich -
r18353:a9fd11ff default
parent child Browse files
Show More
@@ -129,7 +129,6 b' class _httprequesthandler(BaseHTTPServer'
129 SocketServer.ForkingMixIn)
129 SocketServer.ForkingMixIn)
130 env['wsgi.run_once'] = 0
130 env['wsgi.run_once'] = 0
131
131
132 self.close_connection = True
133 self.saved_status = None
132 self.saved_status = None
134 self.saved_headers = []
133 self.saved_headers = []
135 self.sent_headers = False
134 self.sent_headers = False
@@ -154,12 +153,8 b' class _httprequesthandler(BaseHTTPServer'
154 self.length = int(h[1])
153 self.length = int(h[1])
155 # The value of the Connection header is a list of case-insensitive
154 # The value of the Connection header is a list of case-insensitive
156 # tokens separated by commas and optional whitespace.
155 # tokens separated by commas and optional whitespace.
157 if 'close' in [token.strip().lower() for token in
158 self.headers.get('connection', '').split(',')]:
159 should_close = True
160 if should_close:
156 if should_close:
161 self.send_header('Connection', 'close')
157 self.send_header('Connection', 'close')
162 self.close_connection = should_close
163 self.end_headers()
158 self.end_headers()
164 self.sent_headers = True
159 self.sent_headers = True
165
160
General Comments 0
You need to be logged in to leave comments. Login now