##// END OF EJS Templates
httpclient: import f4c380237fd5 to fix keepalive not working
Augie Fackler -
r14293:9adbb5ef default
parent child Browse files
Show More
@@ -629,9 +629,11 b' class HTTPConnection(object):'
629 r = self._current_response
629 r = self._current_response
630 while r.headers is None:
630 while r.headers is None:
631 r._select()
631 r._select()
632 if r.complete() or r.will_close:
632 if r.will_close:
633 self.sock = None
633 self.sock = None
634 self._current_response = None
634 self._current_response = None
635 elif r.complete():
636 self._current_response = None
635 else:
637 else:
636 self._current_response_taken = True
638 self._current_response_taken = True
637 return r
639 return r
@@ -116,6 +116,9 b' dotencode'
116 self.assertEqual('1234567890', resp.read())
116 self.assertEqual('1234567890', resp.read())
117 self.assertEqual(['Value\n Rest of value'],
117 self.assertEqual(['Value\n Rest of value'],
118 resp.headers.getheaders('multiline'))
118 resp.headers.getheaders('multiline'))
119 # Socket should not be closed
120 self.assertEqual(resp.sock.closed, False)
121 self.assertEqual(con.sock.closed, False)
119
122
120 def testSimpleRequest(self):
123 def testSimpleRequest(self):
121 con = http.HTTPConnection('1.2.3.4:80')
124 con = http.HTTPConnection('1.2.3.4:80')
General Comments 0
You need to be logged in to leave comments. Login now