diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Encode repository urls and the feed branch
Links built from the repository url, among them the description link on the index and the Atom and refs links, wrote it as configured, so a name holding a space, '#' or '?' broke them. The feed link in the page head did the same with the branch, which turned a '+' into a space.
Diffstat (limited to 'tests/t0303-robustness.sh')
-rwxr-xr-xtests/t0303-robustness.sh6
1 file changed, 6 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh
index 888ca7f..2e0e849 100755
--- a/tests/t0303-robustness.sh
+++ b/tests/t0303-robustness.sh
@@ -639,6 +639,12 @@ test_expect_success 'the about redirect keeps the query string' '
grep "^Status: 200" tmp
'
+test_expect_success 'the about redirect encodes the repository url once' '
+ cgit_url "foo%2Bbar/about/" >tmp &&
+ grep "^Status: 302" tmp &&
+ grep "^Location: /foo%2Bbar/$" tmp
+'
+
# The about page shows the readme alone and its links lead into the tree,
# so a path below it names nothing, the site about page included.
test_expect_success 'a path below the about page answers 404' '