The bug is in /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py . The url_downloadable function does not try to use the proxy.
The offending code is:
import urlparse
(scheme, netloc, path, querry, fragment) = urlparse.urlsplit(uri)
c = httplib.HTTPConnection(netloc)
c.request("HEAD", path)
It should connect to the proxy, not to the netloc part of the uri.
I used this workaround:
import urlparse
(scheme, netloc, path, querry, fragment) = urlparse.urlsplit(uri) # we still need scheme for later
proxy = os.getenv('http_proxy') # this has already been set by init_proxy
c = httplib.HTTPConnection(proxy) # connect to the proxy instead
c.request("HEAD", uri) # specify the whole URI here
It's a bit of a hack and won't work for ftp uris. I've never submitted an Ubuntu patch before so will have to learn how to do that before fixing it properly, unless someone else is inclined to.
The bug is in /usr/lib/ python2. 6/dist- packages/ UpdateManager/ Core/utils. py . The url_downloadable function does not try to use the proxy.
The offending code is: urlsplit( uri) HTTPConnection( netloc)
import urlparse
(scheme, netloc, path, querry, fragment) = urlparse.
c = httplib.
c.request("HEAD", path)
It should connect to the proxy, not to the netloc part of the uri.
I used this workaround:
import urlparse urlsplit( uri) # we still need scheme for later 'http_proxy' ) # this has already been set by init_proxy HTTPConnection( proxy) # connect to the proxy instead
(scheme, netloc, path, querry, fragment) = urlparse.
proxy = os.getenv(
c = httplib.
c.request("HEAD", uri) # specify the whole URI here
It's a bit of a hack and won't work for ftp uris. I've never submitted an Ubuntu patch before so will have to learn how to do that before fixing it properly, unless someone else is inclined to.