]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-partial-file-support
keep Release.gpg on untrusted to trusted IMS-Hit
[apt.git] / test / integration / test-partial-file-support
index 8cfc3f2d3c0dc2e13ea6c28f90831fdc166ab446..9b5eed1e540fa50dd01b6d18579e16370b11da09 100755 (executable)
@@ -80,7 +80,7 @@ followuprequest() {
 
        webserverconfig 'aptwebserver::support::content-range' 'false'
        copysource $TESTFILE 1M $DOWN
 
        webserverconfig 'aptwebserver::support::content-range' 'false'
        copysource $TESTFILE 1M $DOWN
-       testdownloadfile 'completely downloaded file' "${1}/testfile" "$DOWN" '=' "SHA1:$(sha1sum "$TESTFILE" | cut -d' ' -f 1)"
+       testdownloadfile 'completely downloaded file' "${1}/testfile" "$DOWN" '=' "SHA256:$(sha256sum "$TESTFILE" | cut -d' ' -f 1)"
        testwebserverlaststatuscode '416' "$DOWNLOADLOG"
        webserverconfig 'aptwebserver::support::content-range' 'true'
 
        testwebserverlaststatuscode '416' "$DOWNLOADLOG"
        webserverconfig 'aptwebserver::support::content-range' 'true'
 
@@ -96,6 +96,7 @@ followuprequest() {
 
 testrun() {
        webserverconfig 'aptwebserver::support::range' 'true'
 
 testrun() {
        webserverconfig 'aptwebserver::support::range' 'true'
+       webserverconfig 'aptwebserver::response-header::Accept-Ranges' 'bytes'
        local DOWN='./downloaded/testfile'
 
        copysource $TESTFILE 0 $DOWN
        local DOWN='./downloaded/testfile'
 
        copysource $TESTFILE 0 $DOWN
@@ -125,7 +126,11 @@ testrun() {
        testdownloadfile 'old data' "${1}/testfile" "$DOWN" '='
        testwebserverlaststatuscode '200' "$DOWNLOADLOG"
 
        testdownloadfile 'old data' "${1}/testfile" "$DOWN" '='
        testwebserverlaststatuscode '200' "$DOWNLOADLOG"
 
-       webserverconfig 'aptwebserver::support::range' 'false'
+       if [ "${1%%:*}" = 'https' ] && expr match "$1" "^.*/redirectme$" >/dev/null; then
+               webserverconfig 'aptwebserver::response-header::Accept-Ranges' 'none'
+       else
+               webserverconfig 'aptwebserver::support::range' 'false'
+       fi
 
        copysource $TESTFILE 20 $DOWN
        testdownloadfile 'no server support' "${1}/testfile" "$DOWN" '='
 
        copysource $TESTFILE 20 $DOWN
        testdownloadfile 'no server support' "${1}/testfile" "$DOWN" '='
@@ -146,3 +151,7 @@ serverconfigs "http://localhost:${APTHTTPPORT}"
 changetohttpswebserver
 
 serverconfigs "https://localhost:${APTHTTPSPORT}"
 changetohttpswebserver
 
 serverconfigs "https://localhost:${APTHTTPSPORT}"
+
+webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "https://localhost:${APTHTTPSPORT}/"
+serverconfigs "https://localhost:${APTHTTPSPORT}/redirectme"
+serverconfigs "http://localhost:${APTHTTPPORT}/redirectme"