Commit 99e32c1b authored by Tim Rühsen's avatar Tim Rühsen

* tests/test-redirection.c: Add test for Location URI with spaces in filename

parent d8519844
Pipeline #41121638 failed with stages
in 55 minutes and 11 seconds
......@@ -45,6 +45,19 @@ int main(void)
"Content-Type: text/html",
}
},
{ .name = "/301.html",
.code = "301 Redirect",
.headers = {
"Location: /with spaces .html",
}
},
{ .name = "/with spaces .html",
.code = "200 Dontcare",
.body = "<html>hello2</html>",
.headers = {
"Content-Type: text/html",
}
},
};
// functions won't come back if an error occurs
......@@ -63,5 +76,15 @@ int main(void)
{ NULL } },
0);
wget_test(
// WGET_TEST_KEEP_TMPFILES, 1,
WGET_TEST_OPTIONS, "--trust-server-names",
WGET_TEST_REQUEST_URL, "301.html",
WGET_TEST_EXPECTED_ERROR_CODE, 0,
WGET_TEST_EXPECTED_FILES, &(wget_test_file_t []) {
{ urls[3].name + 1, urls[3].body },
{ NULL } },
0);
exit(0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment