[issue24964] Add tunnel CONNECT response headers to httplib / http.client

Martin Panter report at bugs.python.org
Mon Sep 7 09:12:40 CEST 2015


Martin Panter added the comment:

1) The real problem is when _tunnel() internally calls getresponse(), it notices the connection cannot be reused for another request, and closes the socket object. Perhaps I should rethink my logic; maybe move sock and detach() to HTTPResponse.

2) With some rough experimentation, passing tunnel through the HTTPConnection (plain text HTTP) constructor seems to work for me. However if you meant HTTPSConnection (over TLS) instead, you will probably need to manually do the wrap_socket() step. Maybe that’s why your connection is being dropped.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24964>
_______________________________________


More information about the Python-bugs-list mailing list