- added missing http_request() function stub
[m6w6/ext-http] / tests / send_file_005.phpt
1 --TEST--
2 http_send_file() multiple ranges
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkcgi();
7 ?>
8 --FILE--
9 <?php
10 $_SERVER['HTTP_RANGE'] = 'bytes=0-3, 4-5,9-11';
11 http_send_content_type('text/plain');
12 http_send_file('data.txt');
13 ?>
14 --EXPECTF--
15 Status: 206
16 X-Powered-By: PHP/%s
17 Accept-Ranges: bytes
18 Content-Type: multipart/byteranges; boundary=%d.%d
19
20
21 --%d.%d
22 Content-Type: text/plain
23 Content-Range: bytes 0-3/1010
24
25 0123
26 --%d.%d
27 Content-Type: text/plain
28 Content-Range: bytes 4-5/1010
29
30 45
31 --%d.%d
32 Content-Type: text/plain
33 Content-Range: bytes 9-11/1010
34
35 901
36 --%d.%d--