Show More
@@ -629,9 +629,11 b' class HTTPConnection(object):' | |||
|
629 | 629 | r = self._current_response |
|
630 | 630 | while r.headers is None: |
|
631 | 631 | r._select() |
|
632 |
if r. |
|
|
632 | if r.will_close: | |
|
633 | 633 | self.sock = None |
|
634 | 634 | self._current_response = None |
|
635 | elif r.complete(): | |
|
636 | self._current_response = None | |
|
635 | 637 | else: |
|
636 | 638 | self._current_response_taken = True |
|
637 | 639 | return r |
@@ -116,6 +116,9 b' dotencode' | |||
|
116 | 116 | self.assertEqual('1234567890', resp.read()) |
|
117 | 117 | self.assertEqual(['Value\n Rest of value'], |
|
118 | 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 | 123 | def testSimpleRequest(self): |
|
121 | 124 | con = http.HTTPConnection('1.2.3.4:80') |
General Comments 0
You need to be logged in to leave comments.
Login now