summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-05-29 13:28:01 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-06-26 23:31:15 +0200
commit42654d08c2ca1bee18b6947a39228a35c2409deb (patch)
treec4a04897c2f77018840f201e1d9d89d62b10cdb2 /test/integration
parentcbbf185c3c55effe47f218a07e7b1f324973a8a6 (diff)
deal with 3xx httpcodes as required by HTTP/1.1 spec
An unknown code should be handled the same as the x00 code of this group, but for redirections we used to treat 300 (and a few others) as an error while unknown codes were considered redirections. Instead we check now explicitly for the redirection codes we support for redirecting (and add the 308 defined in RFC 7538) to avoid future problems if new 3xx codes are added expecting certain behaviours. Potentially strange would have been e.g. "305 Use Proxy" sending a Location for the proxy to use – which wouldn't have worked and resulted in an error anyhow, but probably confused users in the process.
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-bug-602412-dequote-redirect4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect
index 9c6aa3945..3db7b5ea0 100755
--- a/test/integration/test-bug-602412-dequote-redirect
+++ b/test/integration/test-bug-602412-dequote-redirect
@@ -30,7 +30,7 @@ Reading package lists..." aptget update
testsuccess --nomsg aptget install unrelated --download-only -y
}
-for CODE in 301 302 307; do
+for CODE in 301 302 307 308; do
webserverconfig 'aptwebserver::redirect::httpcode' "$CODE"
rm -f aptarchive/webserver.log.client*.log
testrun "$CODE" "http://localhost:${APTHTTPPORT}"
@@ -40,7 +40,7 @@ done
changetohttpswebserver
-for CODE in 301 302 307; do
+for CODE in 301 302 307 308; do
webserverconfig 'aptwebserver::redirect::httpcode' "$CODE"
rm -f aptarchive/webserver.log.client*.log
testrun "$CODE" "https://localhost:${APTHTTPSPORT}"