* Fixed a bug which required "=" in Content-Range response message headers
[m6w6/ext-http] / tests / parse_message_005.phpt
diff --git a/tests/parse_message_005.phpt b/tests/parse_message_005.phpt
new file mode 100644 (file)
index 0000000..0ddeb05
--- /dev/null
@@ -0,0 +1,60 @@
+--TEST--
+http_parse_message() content range header w/(o) =
+--SKIPIF--
+<?php
+include 'skip.inc';
+?>
+--FILE--
+<?php
+echo "-TEST\n";
+print_r(http_parse_message(
+"
+HTTP/1.1 206
+Server: Funky/1.0
+Content-Range: bytes=0-0/100
+
+1
+
+HTTP/1.1 206
+Server: Funky/1.0
+Content-Range: bytes 0-0/100
+
+1
+
+"
+));
+echo "Done\n";
+?>
+--EXPECTF--
+%sTEST
+stdClass Object
+(
+    [type] => 2
+    [httpVersion] => 1.1
+    [responseCode] => 206
+    [responseStatus] => 
+    [headers] => Array
+        (
+            [Server] => Funky/1.0
+            [Content-Range] => bytes 0-0/100
+        )
+
+    [body] => 1
+    [parentMessage] => stdClass Object
+        (
+            [type] => 2
+            [httpVersion] => 1.1
+            [responseCode] => 206
+            [responseStatus] => 
+            [headers] => Array
+                (
+                    [Server] => Funky/1.0
+                    [Content-Range] => bytes=0-0/100
+                )
+
+            [body] => 1
+            [parentMessage] => 
+        )
+
+)
+Done