diff options
Diffstat (limited to 'tests/docroot')
-rw-r--r-- | tests/docroot/www/Makefile.am | 2 | ||||
-rw-r--r-- | tests/docroot/www/sendfile.php | 13 |
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 |