summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-717891-abolute-uris-for-proxies
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-07-26 09:22:52 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-07-26 09:22:52 +0200
commitf2380a78aa90ff8a3b76607c0c140810aff84086 (patch)
treecb270551d284b69c05948dc4a41ee953bb5bc883 /test/integration/test-bug-717891-abolute-uris-for-proxies
parenta5b9f4890fc2b367b8f89d10ea2bdb88b8aa071a (diff)
request absolute URIs from proxies again (0.9.9.3 regession)
Commit 2b9c9b7f28b18f6ae3e422020e8934872b06c9f3 not only removes keep-alive, but also changes the request URI send to proxies which are required to be absolute URIs rather than the usual absolute paths. Closes: 717891
Diffstat (limited to 'test/integration/test-bug-717891-abolute-uris-for-proxies')
-rwxr-xr-xtest/integration/test-bug-717891-abolute-uris-for-proxies28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/integration/test-bug-717891-abolute-uris-for-proxies b/test/integration/test-bug-717891-abolute-uris-for-proxies
new file mode 100755
index 000000000..e9c38492e
--- /dev/null
+++ b/test/integration/test-bug-717891-abolute-uris-for-proxies
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
+
+setupaptarchive
+changetowebserver --request-absolute='uri'
+
+msgtest 'Check that absolute paths are' 'not accepted'
+aptget update >/dev/null 2>&1 && msgfail || msgpass
+
+echo 'Acquire::http::Proxy "http://localhost:8080";' > rootdir/etc/apt/apt.conf.d/99proxy
+
+msgtest 'Check that requests to proxies are' 'absolute uris'
+aptget update >/dev/null 2>&1 && msgpass || msgfail
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ unrelated
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst unrelated (0.5~squeeze1 unstable [all])
+Conf unrelated (0.5~squeeze1 unstable [all])' aptget install unrelated -s