[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#763296: [apt] Acquire::http::Proxy-Auto-Detect should handle smoothly multiple proxy URL



Package: apt

Version: 1.0.9.1

Severity: minor

 

--- Please enter the report below this line. ---

If used with something like libproxy-tools proxy command, Acquire::http::Proxy-Auto-Detect tries to us the full returned value as a proxy URL.

libproxy-tools can use proxy.pac and wpad.dat files which are allowed to return multiple access method [1].

 

if FindProxyForURL() returns for example "PROXY proxy.example.com:8080; DIRECT" or "PROXY proxy1.example.com:8080; PROXY proxy2.example.com:8080", the proxy command translate this to "http://proxy.example.com:8080 direct://" or "http://proxy1.example.com:8080 http://proxy2.example.com:8080"

 

If directly used as this, apt fails trying to resolve "proxy.example.com:8080 direct" or "proxy1.example.com:8080 http".

 

To reproduce, create a file /tmp.proxy.sh with this content:

--------------

#!/bin/sh

 

/usr/bin/printf 'http://proxy1.example.com:8080 http://proxy2.example.com:8080'

--------------

and launch:

LANG=C apt-get -o Acquire::http::Proxy-Auto-Detect="/tmp/proxy.sh" -o Debug::Acquire::http=true download vim

 

I don't know if apt should use the multiple access method provided as failover or just cut smartly the input and only use the first part.

 

[1]: http://en.wikipedia.org/wiki/Proxy_auto-config

 

--- System information. ---

Architecture: amd64

Kernel: Linux 3.16-2-amd64

 

Debian Release: jessie/sid

500 utopic ppa.launchpad.net

500 unstable http.debian.net

500 testing http.debian.net

500 stable security.debian.org

500 stable http.debian.net

500 stable dl.google.com

101 experimental http.debian.net

 

--- Package information. ---

Depends (Version) | Installed

=======================================-+-=============

libapt-pkg4.12 (>= 0.9.16) | 1.0.9.1

libc6 (>= 2.15) |

libgcc1 (>= 1:4.1.1) |

libstdc++6 (>= 4.9) |

debian-archive-keyring |

gnupg |

 

 

Package's Recommends field is empty.

 

Suggests (Version) | Installed

==========================-+-============

aptitude | 0.6.11-1

OR synaptic |

OR wajig |

dpkg-dev (>= 1.17.2) | 1.17.13

apt-doc |

python-apt | 0.9.3.10

 

 

 

--- Output from package bug script ---

--

En droit pénal français, un acte de piraterie est « le fait de s'emparer ou de prendre le contrôle par violence ou menace de violence d'un aéronef, d'un navire ou de tout autre moyen de transport à bord desquels des personnes ont pris place, ainsi que d'une plate-forme fixe située sur le plateau continental » (Article L.224-6).

 

Landry MINOZA

landry.minoza@gmail.com


Reply to: