~ubuntu-branches/ubuntu/natty/lighttpd/natty

« back to all changes in this revision

Viewing changes to tests/docroot/www/sendfile.php

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Krzyżaniak (eloy)
  • Date: 2009-10-30 17:37:29 UTC
  • mto: (6.1.4 squeeze)
  • mto: This revision was merged to the branch mainline in revision 50.
  • Revision ID: james.westby@ubuntu.com-20091030173729-ehmsdiba9nkcd0j7
Tags: upstream-1.4.24
Import upstream version 1.4.24

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
function pathencode($path) {
 
4
        return str_replace(',', '%2c', urlencode($path));
 
5
}
 
6
 
 
7
$val = "X-Sendfile2: " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range"];
 
8
 
 
9
if ($_GET["range2"]) $val .= ", " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range2"];
 
10
 
 
11
header($val);
 
12
 
 
13
?>
 
 
b'\\ No newline at end of file'