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 avangel
Recipients avangel, berker.peksag, docs@python, python-dev
Date 2016-10-09.17:47:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1476035245.94.0.399035090149.issue28389@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for fixing this issue. I checked the changed documentation online, and I came up with a very similar solution. One difference is that although this example overrides the make_connection() method, but omits the following lines which are present in the xmlrpc.client.Transport code (I checked that in python 3.5.3):

        # return an existing connection if possible.  This allows
        # HTTP/1.1 keep-alive.
        if self._connection and host == self._connection[0]:
            return self._connection[1]
        # create a HTTP connection object from a host descriptor
        chost, self._extra_headers, x509 = self.get_host_info(host)

Please check xmlrpc.client.Transport.make_connection().
I am not sure about the what kind of effect this may have.
I used chost as the parameter of set_tunnel(), rather than host (after briefly checking the code how it is calculated I felt that it's better to use chost than host, but I don't have a deep understanding of the http.client code).

The proxy_headers is a new thing, I guess it's a good thing if someone needs that.

I don't understand why the '*' character is needed in
connection = http.client.HTTPConnection(*self.proxy)
However I'm quite new to python.

I will try this new code tomorrow.
History
Date User Action Args
2016-10-09 17:47:25avangelsetrecipients: + avangel, docs@python, python-dev, berker.peksag
2016-10-09 17:47:25avangelsetmessageid: <1476035245.94.0.399035090149.issue28389@psf.upfronthosting.co.za>
2016-10-09 17:47:25avangellinkissue28389 messages
2016-10-09 17:47:25avangelcreate