]>
Commit | Line | Data |
---|---|---|
4a3ff193 AM |
1 | Index: Lib/socket.py |
2 | =================================================================== | |
3 | --- Lib/socket.py (revision 54542) | |
4 | +++ Lib/socket.py (working copy) | |
5 | @@ -145,6 +145,10 @@ | |
6 | send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy | |
7 | __getattr__ = _dummy | |
8 | ||
9 | +# Wrapper around platform socket objects. This implements | |
10 | +# a platform-independent dup() functionality. The | |
11 | +# implementation currently relies on reference counting | |
12 | +# to close the underlying socket object. | |
13 | class _socketobject(object): | |
14 | ||
15 | __doc__ = _realsocket.__doc__ | |
16 | Index: Lib/httplib.py | |
17 | =================================================================== | |
18 | --- Lib/httplib.py (revision 54542) | |
19 | +++ Lib/httplib.py (working copy) | |
20 | @@ -1133,6 +1133,9 @@ | |
21 | def __getattr__(self, attr): | |
22 | return getattr(self._sock, attr) | |
23 | ||
24 | + def close(self): | |
25 | + SharedSocketClient.close(self) | |
26 | + self._ssl = None | |
27 | ||
28 | class HTTPSConnection(HTTPConnection): | |
29 | "This class allows communication via SSL." | |
30 | ||
55bf1d53 AM |
31 | --- Lib/httplib.py 2006/05/03 18:03:22 45890 |
32 | +++ Lib/httplib.py 2006/07/26 12:12:56 50844 | |
6e86b9a6 AM |
33 | @@ -926,8 +926,8 @@ |
34 | self.__state = _CS_IDLE | |
35 | ||
36 | if response.will_close: | |
37 | - # this effectively passes the connection to the response | |
38 | - self.close() | |
39 | + # Pass the socket to the response | |
40 | + self.sock = None | |
41 | else: | |
42 | # remember this, so we can tell when it is complete | |
43 | self.__response = response |