4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture "i386
"
10 insertpackage 'stable' 'apt' 'all' '1'
11 setupaptarchive --no-update
13 echo 'alright' > aptarchive/working
14 changetohttpswebserver
15 webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http
://localhost
:${APTHTTPPORT}/"
16 webserverconfig 'aptwebserver::redirect::replace::/redirectme2/' "https
://localhost
:${APTHTTPSPORT}/"
18 msgtest 'download of a file works via' 'http'
19 testsuccess --nomsg downloadfile "http
://localhost
:${APTHTTPPORT}/working
" httpfile
20 testfileequal httpfile 'alright'
22 msgtest 'download of a file works via' 'https'
23 testsuccess --nomsg downloadfile "https
://localhost
:${APTHTTPSPORT}/working
" httpsfile
24 testfileequal httpsfile 'alright'
26 msgtest 'download of a file does not work if' 'https redirected to http'
27 testfailure --nomsg downloadfile "https
://localhost
:${APTHTTPSPORT}/redirectme
/working
" redirectfile
29 msgtest 'libcurl has forbidden access in last request to' 'http resource'
30 testsuccess --nomsg grep -q -E -- "Redirection from https to
'http://.*' is forbidden
" rootdir/tmp/testfailure.output