From a6f62ac7c6b9d6acb51a24a3b0470bb13fda4a05 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 6 Apr 2009 14:05:07 +0000 Subject: [PATCH] ignore port in bosh URL, it's entered separetly. Take into account proxy username when using bosh --- src/common/xmpp/transports_nb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/xmpp/transports_nb.py b/src/common/xmpp/transports_nb.py index efcdb9338..5e7c0a680 100644 --- a/src/common/xmpp/transports_nb.py +++ b/src/common/xmpp/transports_nb.py @@ -57,12 +57,13 @@ def get_proxy_data_from_dict(proxy): if proxy_type == 'bosh' and not proxy['bosh_useproxy']: # with BOSH not over proxy we have to parse the hostname from BOSH URI tcp_host, tcp_port = urisplit(proxy['bosh_uri'])[1], proxy['bosh_port'] + tcp_host = tcp_host.split(':')[0] else: # with proxy!=bosh or with bosh over HTTP proxy we're connecting to proxy # machine tcp_host, tcp_port = proxy['host'], proxy['port'] - if proxy['useauth']: - proxy_user, proxy_pass = proxy['user'], proxy['pass'] + if proxy['useauth']: + proxy_user, proxy_pass = proxy['user'], proxy['pass'] return tcp_host, tcp_port, proxy_user, proxy_pass #: timeout to connect to the server socket, it doesn't include auth