--SKIPIF--
<?php
include 'skip.inc';
+checkmin(5);
?>
--ENV--
HTTP_HOST=www.example.com
--SKIPIF--
<?php
include 'skip.inc';
+checkmin(5);
?>
--ENV--
HTTP_FOO=bar
--SKIPIF--
<?php
include 'skip.inc';
+checkmin(5);
?>
--ENV--
HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib");
?>
--ENV--
?>
--EXPECTF--
%sTEST
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
["cookies"]=>
array(3) {
["name"]=>
--SKIPIF--
<?php
include 'skip.inc';
+checkmin(5);
?>
--FILE--
<?php
--FILE--
<?php
echo "-TEST\n";
-echo http_parse_message(http_get('http://www.google.com'))->body;
+$m = http_parse_message(http_get('http://www.google.com'));
+echo $m->body;
echo "Done\n";
--EXPECTF--
%sTEST
?>
--EXPECTF--
%sTEST
-object(stdClass)#1 (7) {
+object(stdClass)%s {
["type"]=>
int(2)
["httpVersion"]=>
["body"]=>
string(10) "1234567890"
["parentMessage"]=>
- object(stdClass)#2 (7) {
+ object(stdClass)%s {
["type"]=>
int(1)
["httpVersion"]=>
["body"]=>
string(0) ""
["parentMessage"]=>
- object(stdClass)#3 (7) {
+ object(stdClass)%s {
["type"]=>
int(2)
["httpVersion"]=>
["body"]=>
string(0) ""
["parentMessage"]=>
- object(stdClass)#4 (7) {
+ object(stdClass)%s {
["type"]=>
int(1)
["httpVersion"]=>
var_dump(http_parse_params('text/html; charset="iso-8859-1"'));
var_dump(http_parse_params('attachment; filename="gol;got,a.ext"'));
var_dump(http_parse_params('public, must-revalidate, max-age=0'));
-var_dump(http_parse_params('a')->params[0]);
-var_dump(http_parse_params('a=b')->params[0]);
+$p = http_parse_params('a'); var_dump($p->params[0]);
+$p = http_parse_params('a=b'); var_dump($p->params[0]);
echo "Done\n";
--EXPECTF--
%sTEST
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
["params"]=>
array(2) {
[0]=>
}
}
}
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
["params"]=>
array(2) {
[0]=>
}
}
}
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
["params"]=>
array(2) {
[0]=>
}
}
}
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
["params"]=>
array(3) {
[0]=>
--SKIPIF--
<?php
include 'skip.inc';
+checkmin(5);
skipif(!http_support(HTTP_SUPPORT_REQUESTS), "need request support");
skipif(function_exists('zend_thread_id'), "need non-ZTS build");
?>
http_get("http://www.google.com/", null, $info[]);
echo "One free request handle within GLOBAL: ";
-var_dump(http_persistent_handles_count()->http_request["GLOBAL"]["free"]);
+$h = http_persistent_handles_count();
+var_dump($h->http_request["GLOBAL"]["free"]);
echo "Reusing request handle: ";
http_get("http://www.google.com/", null, $info[]);
echo "Done\n";
--EXPECTF--
%sTEST
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
["type"]=>
int(2)
["httpVersion"]=>
<?php
echo "-TEST\n";
-var_dump(str_repeat("abc", 6000) === http_parse_message(http_put_data("http://dev.iworks.at/ext-http/.print_put.php5", str_repeat("abc", 6000/* > CURLBUF_SIZE */)))->body);
+$data = str_repeat("abc", 6000/* > CURLBUF_SIZE */);
+$resp = http_put_data("http://dev.iworks.at/ext-http/.print_put.php5", $data);
+$mess = http_parse_message($resp);
+var_dump($data === $mess->body);
echo "Done\n";
?>
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=-5
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=5-6
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=5981-
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=123,-wtf ?
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=5990-6000
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-3, 4-5,9-11
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-0
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-0,-1
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-3, 4-5,9-11
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-0,-1
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-0
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-1
<?php
include 'skip.inc';
checkcgi();
+checkmin(5);
?>
--ENV--
HTTP_RANGE=bytes=0-1
--SKIPIF--
<?php
include 'skip.inc';
+checkmin(5);
?>
--FILE--
<?php