- tests
[m6w6/ext-http] / tests / send_data_008.phpt
diff --git a/tests/send_data_008.phpt b/tests/send_data_008.phpt
new file mode 100644 (file)
index 0000000..7de621d
--- /dev/null
@@ -0,0 +1,32 @@
+--TEST--
+http_send_data() multiple ranges
+--SKIPIF--
+<?php 
+include 'skip.inc';
+checkcgi();
+?>
+--ENV--
+HTTP_RANGE=bytes=0-0,-1
+--FILE--
+<?php
+http_send_content_type('text/plain');
+http_send_data("01");
+?>
+--EXPECTF--
+Status: 206
+X-Powered-By: PHP/%s
+Accept-Ranges: bytes
+Content-Type: multipart/byteranges; boundary=%d.%d
+
+
+--%d.%d
+Content-Type: text/plain
+Content-Range: bytes 0-0/2
+
+0
+--%d.%d
+Content-Type: text/plain
+Content-Range: bytes 1-1/2
+
+1
+--%d.%d--