Migrated from: https://gitlab.com/m2crypto/m2crypto/-/issues/203
Created by: Matěj Cepl mcepl@cepl.eu
Created at: 2018-02-26T12:35:32.930Z
See https://bugzilla.suse.com/show_bug.cgi?id=1068470, and https://github.com/openSUSE/osc/issues/384#issuecomment-367849209
fp = socket._fileobject(r)
Calling fp.close() (which is indirectly called through the addinfourl object) is a NOP (except a flush()). We should use
fp = socket._fileobject(r, close=True)
(I just checked the recent M2Crypto code and that's what it also does).
However, that's not sufficient, because a ``fp.close()`` still won't close the connection, because ``h.fp`` (``h`` is a ``httplib.HTTPResponse`` instance) is again wrapped in a ``socket._fileobject`` that was created with ``close=False`` (see ``httplib.HTTPResponse.__init__`` and ``M2Crypto.SSL.Connection.makefile``)
M2Crypto.m2urllib.HTTPSHandler.https_open
is affected: the SSL.Connection
is not properly closed, because calling close()
on the addinfourl
instance, which is returned by https_open
, is a "NOP".Changed on 2018-02-26T12:39:54.766Z by Matěj Cepl:
mentioned in merge request !185
Changed on 2018-02-28T09:08:20.381Z by Matěj Cepl:
mentioned in issue #202
Changed on 2018-04-24T08:42:29.210Z by Matěj Cepl:
changed milestone to 0.31
Changed on 2018-10-02T11:53:22.575Z by Matěj Cepl:
changed milestone to 0.32
Changed on 2018-11-11T23:33:56.131Z by Matěj Cepl:
mentioned in merge request !219
Changed on 2019-03-05T07:59:28.989Z by Matěj Cepl:
changed milestone to 0.33
Changed on 2019-04-26T14:30:19.332Z by Matěj Cepl:
changed milestone to 0.34
Changed on 2019-05-30T19:58:23.979Z by Matěj Cepl:
changed milestone to 0.35
(Last edited at 2019-05-30T19:58:23.982Z.)
Changed on 2019-06-08T06:32:44.308Z by Matěj Cepl:
changed milestone to 0.36
(Last edited at 2019-06-08T06:32:44.312Z.)