summaryrefslogtreecommitdiff
path: root/tests/docroot
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-10-14 17:32:38 +0000
committerStefan Bühler <stbuehler@web.de>2009-10-14 17:32:38 +0000
commit8c83976dbefffaa82ed3cddbee6336f3eb1a60c1 (patch)
treeb47587d41afe644d585be01fa3bba9355fd5f4c6 /tests/docroot
parent7322d53684c5c9bd3b81d1093b8adc0074d6875f (diff)
downloadlighttpd-git-8c83976dbefffaa82ed3cddbee6336f3eb1a60c1.tar.gz
mod_fastcgi: Add "X-Sendfile2" - supporting multiple ranged files (fixes #2008)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2651 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/docroot')
-rw-r--r--tests/docroot/www/Makefile.am2
-rw-r--r--tests/docroot/www/sendfile.php13
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/docroot/www/Makefile.am b/tests/docroot/www/Makefile.am
index f535cb25..5bc0c0b3 100644
--- a/tests/docroot/www/Makefile.am
+++ b/tests/docroot/www/Makefile.am
@@ -1,5 +1,5 @@
EXTRA_DIST=cgi.php cgi.pl index.html index.txt phpinfo.php \
redirect.php cgi-pathinfo.pl get-env.php get-server-env.php \
nph-status.pl prefix.fcgi get-header.pl ssi.shtml get-post-len.pl \
- exec-date.shtml 404.fcgi 404.html 404.pl send404.pl crlfcrash.pl
+ exec-date.shtml 404.fcgi 404.html 404.pl send404.pl crlfcrash.pl sendfile.php
SUBDIRS=go indexfile expire
diff --git a/tests/docroot/www/sendfile.php b/tests/docroot/www/sendfile.php
new file mode 100644
index 00000000..0aa8786f
--- /dev/null
+++ b/tests/docroot/www/sendfile.php
@@ -0,0 +1,13 @@
+<?php
+
+function pathencode($path) {
+ return str_replace(',', '%2c', urlencode($path));
+}
+
+$val = "X-Sendfile2: " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range"];
+
+if ($_GET["range2"]) $val .= ", " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range2"];
+
+header($val);
+
+?> \ No newline at end of file