summaryrefslogtreecommitdiff
path: root/test/libapt/apt-proxy-script
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-10-02 17:20:33 +0200
committerJulian Andres Klode <jak@debian.org>2016-10-05 21:53:39 +0200
commit78046276db89bed39cde785760cd5d0c694ddb1d (patch)
treefc7a0bd20add5e185859d7db1ad82492f87b74a1 /test/libapt/apt-proxy-script
parentf54a4774ea901f861de96b13a4d952b8ea6c2976 (diff)
Do not read stderr from proxy autodetection scripts
This fixes a regression introduced in commit 8f858d560e3b7b475c623c4e242d1edce246025a don't leak FD in AutoProxyDetect command return parsing which accidentally made the proxy autodetection code also read the scripts output on stderr, not only on stdout when it switched the code from popen() to Popen(). Reported-By: Tim Small <tim@seoss.co.uk> (cherry picked from commit 0ecceb5bb9cc8727c117195945b7116aceb984fe)
Diffstat (limited to 'test/libapt/apt-proxy-script')
-rwxr-xr-xtest/libapt/apt-proxy-script9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libapt/apt-proxy-script b/test/libapt/apt-proxy-script
new file mode 100755
index 000000000..41cfdc30f
--- /dev/null
+++ b/test/libapt/apt-proxy-script
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ $1 = "http://www.debian.org:90/temp/test" ]; then
+ echo "http://example.com"
+fi
+if [ $1 = "http://www.debian.org:91/temp/test" ]; then
+ echo "This works" >&2
+ echo "http://example.com/foo"
+fi