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 <rep...@bugs.python.org>
<http://bugs.python.org/issue24964>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to