projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- release 0.18.0
[m6w6/ext-http]
/
tests
/
HttpMessage_001.phpt
diff --git
a/tests/HttpMessage_001.phpt
b/tests/HttpMessage_001.phpt
index 6d8171dd639907624c89a61ab74a8613e5cb34ae..1ceda68e24748ef9684d2ccaa2bf1db88cb98e3d 100644
(file)
--- a/
tests/HttpMessage_001.phpt
+++ b/
tests/HttpMessage_001.phpt
@@
-3,7
+3,7
@@
HttpMessage
--SKIPIF--
<?php
include 'skip.inc';
--SKIPIF--
<?php
include 'skip.inc';
-check
ver
(5);
+check
min
(5);
?>
--FILE--
<?php
?>
--FILE--
<?php
@@
-12,7
+12,7
@@
$m = new HttpMessage(
"HTTP/1.1 301\r\n".
"Location: /anywhere\r\n".
"HTTP/1.1 302\r\n".
"HTTP/1.1 301\r\n".
"Location: /anywhere\r\n".
"HTTP/1.1 302\r\n".
- "Location: /somwhere\r\n".
+ "Location: /som
e
where\r\n".
"HTTP/1.1 206\r\n".
"Content-Range: bytes=2-3\r\n".
"Transfer-Encoding: chunked\r\n".
"HTTP/1.1 206\r\n".
"Content-Range: bytes=2-3\r\n".
"Transfer-Encoding: chunked\r\n".
@@
-23,30
+23,36
@@
$m = new HttpMessage(
);
var_dump($m->getBody());
);
var_dump($m->getBody());
-var_dump($m->toString());
-var_dump(HttpMessage::fromString($m->toString())->toString());
+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"
?>
--EXPECTF--
%sTEST
string(1) "X"
-string(13
4
) "HTTP/1.1 301
+string(13
5
) "HTTP/1.1 301
Location: /anywhere
HTTP/1.1 302
Location: /anywhere
HTTP/1.1 302
-Location: /somwhere
+Location: /som
e
where
HTTP/1.1 206
Content-Range: bytes=2-3
Content-Length: 1
X
"
HTTP/1.1 206
Content-Range: bytes=2-3
Content-Length: 1
X
"
-string(134) "HTTP/1.1 301
-Location: /anywhere
-HTTP/1.1 302
-Location: /somwhere
-HTTP/1.1 206
+string(64) "HTTP/1.1 206
Content-Range: bytes=2-3
Content-Length: 1
X
"
Content-Range: bytes=2-3
Content-Length: 1
X
"
-
+string(36) "HTTP/1.1 302
+Location: /somewhere
+"
+string(35) "HTTP/1.1 301
+Location: /anywhere
+"
+Done