Bug 900796

Summary: url proxy settings not respected for mirrors from metalink
Product: [openSUSE] openSUSE 12.3 Reporter: c unix <cunix>
Component: libzyppAssignee: Vítězslav Čížek <vcizek>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mpluskal, vcizek
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description c unix 2014-10-11 21:48:29 UTC
System: openSUSE 12.3 desktop; x86_64; KDE 4.10.5; packages and repos are slightly modified, but zypper, libzypp, curl, yast2 are installed and updated from the standard repositories;
The described behaviour could be observed since the fresh installation.


Using Repos with baseurls in the following form (example oneliner):

http://download.opensuse.org/repositories/network:/utilities/openSUSE_12.3/?proxy=127.0.0.1&proxyport=9999&auth=digest&proxyuser=myusername&proxypass=mypw


zypp.conf edited as follows:
download.max_concurrent_connections = 1
download.transfer_timeout = 10


Zypper called from the command line or via yast works as expected while downloading from opensuse.org (via proxy) - especially when refreshing the repo data.

When downloading new packages at first a GET request with this header is sent to download.opensuse.org:
Accept: */*, application/metalink+xml, application/metalink4+xml\r\n

The server answers with a header
Content-Type: application/metalink4+xml; charset=UTF-8\r\n
and a 'metalink4' xml-file with a mirror list - this works.

As far as a mirror is picked, the software tries to access repeatedly the same mirror directly without honouring the proxy settings. This can be detected by iptables rules.

After the time from 'download.transfer_timeout' times out, download.opensuse.org is asked again for the rpm, now with a http-header:
Accept: */*\r\n

The server answers with a status code: 302
but also gives a http-header with (for example):
Location: http://ftp5.gwdg.de/pub/opensuse/repositories/network:/utilities/openSUSE_12.3/src/wireshark-1.12.1-136.1.src.rpm\r\n

The delivered html document contains the following line (example):
<p>The document has moved <a href="http://ftp5.gwdg.de/pub/opensuse/repositories/network:/utilities/openSUSE_12.3/src/wireshark-1.12.1-136.1.src.rpm">here</a>.</p>\n

Without further delay the configured proxy is contacted and a connection to this mirror (here at ftp5.gwdg.de) is established by the proxyserver immediately. Now the download proceeds as expected.

This procedure repeats for each rpm that should be downloaded via an url-configured proxy.


I would like zypper, libzypp, curl or whatever is responsible to respect the proxy settings already when choosing a mirror from the metalink-file.
Comment 1 Vítězslav Čížek 2015-06-11 12:54:03 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 933839 ***