By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,538 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,538 IT Pros & Developers. It's quick & easy.

httplib throw a proxy

P: n/a
I'm using a library based on httplib.
Recently i've done a conversion for use of https with a key and
certificate file. This goes perfectly :-) .

Now, the problem is passing throw an http_proxy.
It seems because httplib (based on socket.py) try to autenticate on the
proxy.
I'm only with this problem ? it's impossible :-|

any ideas ?
thank's all
Glauco
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mon, 22 Mar 2004 12:45:28 +0100, Glauco <00*********@fastwebnet.it> wrote:
I'm using a library based on httplib.

Now, the problem is passing throw an http_proxy.
It seems because httplib (based on socket.py) try to autenticate on the
proxy.
I'm only with this problem ? it's impossible :-|

any ideas ?


use urllib2, for example :

import urllib2

def install_proxy():
"""initialize urllib2 to go through a proxy"""
proxy_support = urllib2.ProxyHandler(
{ 'http' : "http://username:passwd@IP_proxy:8080",
'ftp' : "http://username:passwd@IP_proxy:8080" } )
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)

Regards
Jul 18 '05 #2

P: n/a
F. Petitjean wrote:
On Mon, 22 Mar 2004 12:45:28 +0100, Glauco <00*********@fastwebnet.it> wrote:
I'm using a library based on httplib.

Now, the problem is passing throw an http_proxy.
It seems because httplib (based on socket.py) try to autenticate on the
proxy.
I'm only with this problem ? it's impossible :-|

any ideas ?

use urllib2, for example :

import urllib2

def install_proxy():
"""initialize urllib2 to go through a proxy"""
proxy_support = urllib2.ProxyHandler(
{ 'http' : "http://username:passwd@IP_proxy:8080",
'ftp' : "http://username:passwd@IP_proxy:8080" } )
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)

Regards


Hi Jean , thank's for response, but i cannot easy do change to base
library.
This is ZSI and is well structure over httplib.
My idea is to do some change at middle-level because proxy go well but
only without certification.

httplib.py
*
socket.py
Thank's again
Glauco
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.