summaryrefslogtreecommitdiff
path: root/tests/docroot/www/sendfile.php
blob: 0aa8786f02d884ff7ebf870b40fdedae9c1df3f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);

?>