summaryrefslogtreecommitdiff
path: root/tests/prepare.sh
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2015-11-07 15:00:18 +0000
committerStefan Bühler <stbuehler@web.de>2015-11-07 15:00:18 +0000
commit85d8a17575d8eba2f830f6c15283a45773fa78d8 (patch)
treea0f17e9220f4ce69e214f68b32bbadb65fbca7b1 /tests/prepare.sh
parent3943de280e9966e064ae704e0e11aff155e875a9 (diff)
downloadlighttpd1.4-85d8a17575d8eba2f830f6c15283a45773fa78d8.tar.gz
lighttpd1.4-85d8a17575d8eba2f830f6c15283a45773fa78d8.zip
[core] encode path with ENCODING_REL_URI in redirect to directory (fixes #2661, thx gstrauss)
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3052 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/prepare.sh')
-rwxr-xr-xtests/prepare.sh81
1 files changed, 42 insertions, 39 deletions
diff --git a/tests/prepare.sh b/tests/prepare.sh
index f24d14b4..2a0f2537 100755
--- a/tests/prepare.sh
+++ b/tests/prepare.sh
@@ -2,55 +2,58 @@
set -e
-if test x$srcdir = x; then
+if test "x${srcdir}" = "x"; then
srcdir=.
fi
-if test x$top_builddir = x; then
+if test "x${top_builddir}" = "x"; then
top_builddir=..
fi
-tmpdir=$top_builddir/tests/tmp/lighttpd
+tmpdir="${top_builddir}/tests/tmp/lighttpd"
# create test-framework
-rm -rf $tmpdir
-mkdir -p $tmpdir/servers/www.example.org/pages/
-mkdir -p $tmpdir/servers/www.example.org/pages/dummydir/
-mkdir -p $tmpdir/servers/www.example.org/pages/go/
-mkdir -p $tmpdir/servers/www.example.org/pages/expire/
-mkdir -p $tmpdir/servers/www.example.org/pages/indexfile/
-mkdir -p $tmpdir/servers/123.example.org/pages/
-mkdir -p $tmpdir/servers/a.example.org/pages/a/
-mkdir -p $tmpdir/servers/b.example.org/pages/b/
-mkdir -p $tmpdir/logs/
-mkdir -p $tmpdir/cache/
-mkdir -p $tmpdir/cache/compress/
+rm -rf "${tmpdir}"
+mkdir -p "${tmpdir}/servers/www.example.org/pages/"
+mkdir -p "${tmpdir}/servers/www.example.org/pages/dummydir/"
+mkdir -p "${tmpdir}/servers/www.example.org/pages/~test ä_/"
+mkdir -p "${tmpdir}/servers/www.example.org/pages/go/"
+mkdir -p "${tmpdir}/servers/www.example.org/pages/expire/"
+mkdir -p "${tmpdir}/servers/www.example.org/pages/indexfile/"
+mkdir -p "${tmpdir}/servers/123.example.org/pages/"
+mkdir -p "${tmpdir}/servers/a.example.org/pages/a/"
+mkdir -p "${tmpdir}/servers/b.example.org/pages/b/"
+mkdir -p "${tmpdir}/logs/"
+mkdir -p "${tmpdir}/cache/"
+mkdir -p "${tmpdir}/cache/compress/"
# copy everything into the right places
-cp $srcdir/docroot/www/*.html \
- $srcdir/docroot/www/*.php \
- $srcdir/docroot/www/*.pl \
- $srcdir/docroot/www/*.fcgi \
- $srcdir/docroot/www/*.shtml \
- $srcdir/docroot/www/*.txt $tmpdir/servers/www.example.org/pages/
-cp $srcdir/docroot/www/go/*.php $tmpdir/servers/www.example.org/pages/go/
-cp $srcdir/docroot/www/expire/*.txt $tmpdir/servers/www.example.org/pages/expire/
-cp $srcdir/docroot/www/indexfile/*.php $tmpdir/servers/www.example.org/pages/indexfile/
-cp $srcdir/docroot/123/*.txt \
- $srcdir/docroot/123/*.html \
- $srcdir/docroot/123/*.php \
- $srcdir/docroot/123/*.bla $tmpdir/servers/123.example.org/pages/
-cp $srcdir/lighttpd.user $tmpdir/
-cp $srcdir/lighttpd.htpasswd $tmpdir/
-cp $srcdir/var-include-sub.conf $tmpdir/../
-touch $tmpdir/servers/www.example.org/pages/image.jpg \
- $tmpdir/servers/www.example.org/pages/image.JPG \
- $tmpdir/servers/www.example.org/pages/Foo.txt \
- $tmpdir/servers/www.example.org/pages/a \
- $tmpdir/servers/www.example.org/pages/index.html~ \
- $tmpdir/servers/a.example.org/pages/a/a.html \
- $tmpdir/servers/b.example.org/pages/b/b.html
-echo "12345" > $tmpdir/servers/www.example.org/pages/range.pdf
+cp "${srcdir}/docroot/www/"*.html \
+ "${srcdir}/docroot/www/"*.php \
+ "${srcdir}/docroot/www/"*.pl \
+ "${srcdir}/docroot/www/"*.fcgi \
+ "${srcdir}/docroot/www/"*.shtml \
+ "${srcdir}/docroot/www/"*.txt \
+ "${tmpdir}/servers/www.example.org/pages/"
+cp "${srcdir}/docroot/www/go/"*.php "${tmpdir}/servers/www.example.org/pages/go/"
+cp "${srcdir}/docroot/www/expire/"*.txt "${tmpdir}/servers/www.example.org/pages/expire/"
+cp "${srcdir}/docroot/www/indexfile/"*.php "${tmpdir}/servers/www.example.org/pages/indexfile/"
+cp "${srcdir}/docroot/123/"*.txt \
+ "${srcdir}/docroot/123/"*.html \
+ "${srcdir}/docroot/123/"*.php \
+ "${srcdir}/docroot/123/"*.bla \
+ "${tmpdir}/servers/123.example.org/pages/"
+cp "${srcdir}/lighttpd.user" "${tmpdir}/"
+cp "${srcdir}/lighttpd.htpasswd" "${tmpdir}/"
+cp "${srcdir}/var-include-sub.conf" "${tmpdir}/../"
+touch "${tmpdir}/servers/www.example.org/pages/image.jpg" \
+ "${tmpdir}/servers/www.example.org/pages/image.JPG" \
+ "${tmpdir}/servers/www.example.org/pages/Foo.txt" \
+ "${tmpdir}/servers/www.example.org/pages/a" \
+ "${tmpdir}/servers/www.example.org/pages/index.html~" \
+ "${tmpdir}/servers/a.example.org/pages/a/a.html" \
+ "${tmpdir}/servers/b.example.org/pages/b/b.html"
+echo "12345" > "${tmpdir}/servers/www.example.org/pages/range.pdf"
printf "%-40s" "preparing infrastructure"