projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- consistent usage of HTTP_G macro (only)
[m6w6/ext-http]
/
tests
/
HttpMessage_001.phpt
diff --git
a/tests/HttpMessage_001.phpt
b/tests/HttpMessage_001.phpt
index eda359c487333bb00bcdf219a3964789e272e7a3..c2fe79a33e6cb64c0cdbec2daeabb26d91ddf955 100644
(file)
--- a/
tests/HttpMessage_001.phpt
+++ b/
tests/HttpMessage_001.phpt
@@
-12,8
+12,8
@@
$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".
- "HTTP/1.1 206\r\n".
+ "Location: /som
e
where\r\n".
+ "HTTP/1.1 206
Partial content
\r\n".
"Content-Range: bytes=2-3\r\n".
"Transfer-Encoding: chunked\r\n".
"\r\n".
"Content-Range: bytes=2-3\r\n".
"Transfer-Encoding: chunked\r\n".
"\r\n".
@@
-22,31
+22,46
@@
$m = new HttpMessage(
"00"
);
"00"
);
+var_dump($m->getResponseStatus());
+
+$x = $m->getParentMessage();
+$x = $m->getParentMessage();
+$x = $m->getParentMessage();
+
var_dump($m->getBody());
var_dump($m->getBody());
-var_dump($m->toString(true));
var_dump(HttpMessage::fromString($m->toString(true))->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
?>
--EXPECTF--
%sTEST
+string(15) "Partial content"
string(1) "X"
string(1) "X"
-string(1
34
) "HTTP/1.1 301
+string(1
90
) "HTTP/1.1 301
Location: /anywhere
HTTP/1.1 302
Location: /anywhere
HTTP/1.1 302
-Location: /somwhere
-HTTP/1.1 206
+Location: /som
e
where
+HTTP/1.1 206
Partial content
Content-Range: bytes=2-3
Content-Range: bytes=2-3
+X-Original-Transfer-Encoding: chunked
Content-Length: 1
X
"
Content-Length: 1
X
"
-string(134) "HTTP/1.1 301
-Location: /anywhere
-HTTP/1.1 302
-Location: /somwhere
-HTTP/1.1 206
+string(119) "HTTP/1.1 206 Partial content
Content-Range: bytes=2-3
Content-Range: bytes=2-3
+X-Original-Transfer-Encoding: chunked
Content-Length: 1
X
"
Content-Length: 1
X
"
-
+string(36) "HTTP/1.1 302
+Location: /somewhere
+"
+string(35) "HTTP/1.1 301
+Location: /anywhere
+"
+Done