add test & prepare release
authorMichael Wallner <mike@php.net>
Fri, 5 Dec 2008 09:29:42 +0000 (09:29 +0000)
committerMichael Wallner <mike@php.net>
Fri, 5 Dec 2008 09:29:42 +0000 (09:29 +0000)
package2.xml
tests/parse_message_006.phpt [new file with mode: 0644]

index 90bf84161a4bad4bcd73874436db4fc8b56b278a..e35c3280523930877c9c7d2fa6f30442187500f7 100644 (file)
@@ -28,7 +28,7 @@ support. Parallel requests are available for PHP 5 and greater.
   <email>mike@php.net</email>
   <active>yes</active>
  </lead>
- <date>2008-10-20</date>
+ <date>2008-12-05</date>
  <version>
   <release>1.6.2</release>
   <api>1.6.0</api>
@@ -217,6 +217,7 @@ support. Parallel requests are available for PHP 5 and greater.
     <file role="test" name="parse_message_003.phpt"/>
     <file role="test" name="parse_message_004.phpt"/>
     <file role="test" name="parse_message_005.phpt"/>
+    <file role="test" name="parse_message_006.phpt"/>
     <file role="test" name="parse_params_001.phpt"/>
     <file role="test" name="persistent_handles_001.phpt"/>
     <file role="test" name="persistent_handles_002.phpt"/>
diff --git a/tests/parse_message_006.phpt b/tests/parse_message_006.phpt
new file mode 100644 (file)
index 0000000..d1d435f
--- /dev/null
@@ -0,0 +1,38 @@
+--TEST--
+mixed EOL trap
+--SKIPIF--
+<?php
+include 'skip.inc';
+?>
+--FILE--
+<?php
+echo "-TEST\n";
+
+$message =
+"HTTP/1.1 200 Ok\n".
+"Header: Value\r\n".
+"Connection: close\r\n".
+"\n".
+"Bug!";
+
+print_r(http_parse_message($message));
+
+echo "Done\n";
+--EXPECTF--
+%aTEST
+stdClass Object
+(
+    [type] => 2
+    [httpVersion] => 1.1
+    [responseCode] => 200
+    [responseStatus] => Ok
+    [headers] => Array
+        (
+            [Header] => Value
+            [Connection] => close
+        )
+
+    [body] => Bug!
+    [parentMessage] => 
+)
+Done