Project

Profile

Help

Story #1032 ยป threaded.py.patch

mkovacik@redhat.com, 06/04/2015 11:23 PM

View differences:

threaded.py 2015-06-04 17:08:13.895987873 -0400
338 338

  
339 339
    # Set session.proxies according to given url and port
340 340
    protocol, remainder = urllib.splittype(config.proxy_url)
341
    host, remainder = urllib.splithost(remainder)
341
    # if protocol wasn't parsed, the url is most likely reduced to a host name
342
    if protocol is None:
343
        host = config.proxy_url
344
    else:
345
        host, remainder = urllib.splithost(remainder)
342 346
    url = ':'.join((host, str(config.proxy_port)))
343 347

  
344 348
    if config.proxy_username is not None:
......
346 350
        auth = config.proxy_username + password_part
347 351
        url = '@'.join((auth, url))
348 352

  
349
    session.proxies['https'] = '://'.join((protocol, url))
350
    session.proxies['http'] = '://'.join((protocol, url))
353
    if protocol is not None:
354
        session.proxies['https'] = '://'.join((protocol, url))
355
        session.proxies['http'] = '://'.join((protocol, url))
356
    else:
357
        session.proxies['http'] = 'http://' + url
358
        session.proxies['https'] = 'https://' + url
351 359

  
352 360
    # Set session.auth if proxy username is specified
353 361
    if config.proxy_username is not None:
    (1-1/1)