lighttpd1.4/tests/docroot/www/sendfile.php

13 lines
298 B
PHP

<?php
function pathencode($path) {
return str_replace(',', '%2c', urlencode($path));
}
$val = "X-Sendfile2: " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range"];
if (isset($_GET["range2"])) $val .= ", " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range2"];
header($val);
?>