Closed GoogleCodeExporter closed 8 years ago
Look like that class HTTPSConnectionWithTimeout simply cannot work with any
proxy
just:
h=httplib2.HTTPSConnectionWithTimeout(proxy_info=p)
h.connect()
will always fail because inside method
'httplib2.HTTPSConnectionWithTimeout.connect'
calls 'setproxy' on self.sock which was never initialized.
Original comment by Alexande...@googlemail.com
on 8 May 2009 at 7:15
Solution of problem is simple:
Peplace:
if self.proxy_info and self.proxy_info.isgood():
self.sock.setproxy(*self.proxy_info.astuple())
sock.setproxy(*self.proxy_info.astuple())
with:
if self.proxy_info and self.proxy_info.isgood():
sock = socks.socksocket(socket.AF_INET, socket.SOCK_STREAM)
sock.setproxy(*self.proxy_info.astuple())
In method HTTPSConnectionWithTimeout.connect
Original comment by Alexande...@googlemail.com
on 8 May 2009 at 7:38
OK. I format suggested correction as a patch.
May be it helps...
Original comment by Alexande...@googlemail.com
on 13 May 2009 at 7:10
Attachments:
Fixed in trunk.
Original comment by joe.gregorio@gmail.com
on 28 Jul 2009 at 2:49
Original issue reported on code.google.com by
Alexande...@googlemail.com
on 7 May 2009 at 2:23Attachments: