470,614 Members | 1,572 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

httplib throw a proxy

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
2 2039
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
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.

Similar topics

2 posts views Thread by scummer | last post: by
2 posts views Thread by Lothar Scholz | last post: by
4 posts views Thread by Adrian Albisser | last post: by
reply views Thread by Robert | last post: by
4 posts views Thread by michaelparkin | last post: by
reply views Thread by Michael Ekstrand | last post: by
4 posts views Thread by JuHui | last post: by
3 posts views Thread by rhXX | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.