- add ob_(deflate|inflate)handler
[m6w6/ext-http] / tests / HttpMessage_001.phpt
index eda359c487333bb00bcdf219a3964789e272e7a3..6791bc336173fbe926742eb48c5714356eec315d 100644 (file)
@@ -12,7 +12,7 @@ $m = new HttpMessage(
        "HTTP/1.1 301\r\n".
        "Location: /anywhere\r\n".
        "HTTP/1.1 302\r\n".
-       "Location: /somwhere\r\n".
+       "Location: /somewhere\r\n".
        "HTTP/1.1 206\r\n".
        "Content-Range: bytes=2-3\r\n".
        "Transfer-Encoding: chunked\r\n".
@@ -23,30 +23,38 @@ $m = new HttpMessage(
 );
 
 var_dump($m->getBody());
-var_dump($m->toString(true));
 var_dump(HttpMessage::fromString($m->toString(true))->toString(true));
+do {
+       var_dump($m->toString());
+} while ($m = $m->getParentMessage());
+
+echo "Done\n";
 ?>
 --EXPECTF--
 %sTEST
 string(1) "X"
-string(134) "HTTP/1.1 301
+string(174) "HTTP/1.1 301
 Location: /anywhere
 HTTP/1.1 302
-Location: /somwhere
+Location: /somewhere
 HTTP/1.1 206
 Content-Range: bytes=2-3
+X-Original-Transfer-Encoding: chunked
 Content-Length: 1
 
 X
 "
-string(134) "HTTP/1.1 301
-Location: /anywhere
-HTTP/1.1 302
-Location: /somwhere
-HTTP/1.1 206
+string(103) "HTTP/1.1 206
 Content-Range: bytes=2-3
+X-Original-Transfer-Encoding: chunked
 Content-Length: 1
 
 X
 "
-
+string(36) "HTTP/1.1 302
+Location: /somewhere
+"
+string(35) "HTTP/1.1 301
+Location: /anywhere
+"
+Done