This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author janssen
Recipients gvanrossum, janssen, vila
Date 2007-11-26.19:42:58
SpamBayes Score 0.037481707
Marked as misclassified No
Message-id <4b3e516a0711261142y315ffe5bv31aeb33a4bf00bbd@mail.gmail.com>
In-reply-to <1195988952.87.0.798567054166.issue1348@psf.upfronthosting.co.za>
Content
No, the close must be removed.  It's the wrong *way* to "transfer
responsibility".  Close means "close", not "I wash my hands of
responsibility here".  What's hidden here is that the open socket is
transferred to the response, which continues to use it.  In fact, the
close() should happen when the caller is finished with the response,
probably as effect of the GC of the "response" object.

On Nov 25, 2007 3:09 AM, vila <report@bugs.python.org> wrote:
>
> vila added the comment:
>
> The title of this bug is scary.
>
> httplib rightly close the socket because that's the way to transfer the
> responsibility of the close to the user of the HttpResponse object.
>
> The close MUST stays there.
>
> I do encounter a bug related to that close while trying to use the ssl
> module in python2.6.
>
> I'm willing to help fixing it but *this* bug may not be the right place
> to do so (even if related).
>
> I'm a bit lost on how to help right now since the involved changes seems
> to occur in both python3.0 and python2.6 and I'm currently targeting 2.4
> and 2.5.
>
> ----------
> nosy: +vila
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1348>
> __________________________________
>
History
Date User Action Args
2007-11-26 19:42:59janssensetspambayes_score: 0.0374817 -> 0.037481707
recipients: + janssen, gvanrossum, vila
2007-11-26 19:42:59janssenlinkissue1348 messages
2007-11-26 19:42:58janssencreate