- tests
[m6w6/ext-http] / tests / send_file_006.phpt
1 --TEST--
2 http_send_file() first/last byte range
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkcgi();
7 ?>
8 --ENV--
9 HTTP_RANGE=bytes=0-0,-1
10 --FILE--
11 <?php
12 http_send_content_type("text/plain");
13 http_send_file('data.txt');
14 ?>
15 --EXPECTF--
16 Status: 206
17 X-Powered-By: PHP/%s
18 Accept-Ranges: bytes
19 Content-Type: multipart/byteranges; boundary=%d.%d
20
21
22 --%d.%d
23 Content-Type: text/plain
24 Content-Range: bytes 0-0/1010
25
26 0
27 --%d.%d
28 Content-Type: text/plain
29 Content-Range: bytes 1009-1009/1010
30
31
32
33 --%d.%d--