projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
don't limit header length to 1k
[m6w6/ext-http]
/
tests
/
HttpMessage_001.phpt
diff --git
a/tests/HttpMessage_001.phpt
b/tests/HttpMessage_001.phpt
index 6791bc336173fbe926742eb48c5714356eec315d..ecdf22848a5e4061bcfa78527011e02fe177e38c 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';
-checkmin(
5
);
+checkmin(
"5.2.5"
);
?>
--FILE--
<?php
?>
--FILE--
<?php
@@
-13,7
+13,7
@@
$m = new HttpMessage(
"Location: /anywhere\r\n".
"HTTP/1.1 302\r\n".
"Location: /somewhere\r\n".
"Location: /anywhere\r\n".
"HTTP/1.1 302\r\n".
"Location: /somewhere\r\n".
- "HTTP/1.1 206\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,29
+22,39
@@
$m = new HttpMessage(
"00"
);
"00"
);
+var_dump($m->getResponseStatus());
+
+$x = $m->getParentMessage();
+$x = $m->getParentMessage();
+$x = $m->getParentMessage();
+
var_dump($m->getBody());
var_dump(HttpMessage::fromString($m->toString(true))->toString(true));
var_dump($m->getBody());
var_dump(HttpMessage::fromString($m->toString(true))->toString(true));
-do {
- var_dump($m->toString());
-} while ($m = $m->getParentMessage());
+try {
+ do {
+ var_dump($m->toString());
+ } while ($m = $m->getParentMessage());
+} catch (HttpException $ex) {
+}
echo "Done\n";
?>
--EXPECTF--
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
+string(15) "Partial content"
string(1) "X"
string(1) "X"
-string(1
74
) "HTTP/1.1 301
+string(1
90
) "HTTP/1.1 301
Location: /anywhere
HTTP/1.1 302
Location: /somewhere
Location: /anywhere
HTTP/1.1 302
Location: /somewhere
-HTTP/1.1 206
+HTTP/1.1 206
Partial content
Content-Range: bytes=2-3
X-Original-Transfer-Encoding: chunked
Content-Length: 1
X
"
Content-Range: bytes=2-3
X-Original-Transfer-Encoding: chunked
Content-Length: 1
X
"
-string(1
03) "HTTP/1.1 206
+string(1
19) "HTTP/1.1 206 Partial content
Content-Range: bytes=2-3
X-Original-Transfer-Encoding: chunked
Content-Length: 1
Content-Range: bytes=2-3
X-Original-Transfer-Encoding: chunked
Content-Length: 1