--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(15) "Partial content"
string(1) "X"
string(190) "HTTP/1.1 301
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpMessage');
?>
--FILE--
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Array
(
)
-%sFatal error%sCannot access HttpMessage properties by reference or array key/index in%s
+%aFatal error%aCannot access HttpMessage properties by reference or array key/index in%a
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
int(3)
string(148) "HTTP/1.1 301
Location: /anywhere
X
"
object(HttpMessage)#%d (%d) {
- ["type:protected"]=>
+ ["type":protected]=>
int(2)
- ["body:protected"]=>
+ ["body":protected]=>
string(0) ""
- ["requestMethod:protected"]=>
+ ["requestMethod":protected]=>
string(0) ""
- ["requestUrl:protected"]=>
+ ["requestUrl":protected]=>
string(0) ""
- ["responseStatus:protected"]=>
+ ["responseStatus":protected]=>
string(2) "Ok"
- ["responseCode:protected"]=>
+ ["responseCode":protected]=>
int(200)
- ["httpVersion:protected"]=>
+ ["httpVersion":protected]=>
float(1.1)
- ["headers:protected"]=>
+ ["headers":protected]=>
array(1) {
["Server"]=>
string(9) "Funky/1.0"
}
- ["parentMessage:protected"]=>
+ ["parentMessage":protected]=>
NULL
}
int(1)
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(false)
string(3) "Hi!"
Done
\ No newline at end of file
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
GET http://example.com/ HTTP/1.0
HTTP/1.1 200 ok
Server: Funky/2.0
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
==
HTTP/1.1 304 Not Modified
==
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
GET /first HTTP/1.1
HTTP/1.1 200 Ok-first
GET /second HTTP/1.1
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(42) "a=b&c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3"
NULL
string(1) "b"
int(3)
}
object(HttpQueryString)#1 (2) {
- ["queryArray:private"]=>
+ ["queryArray":"HttpQueryString":private]=>
&array(3) {
["c"]=>
string(3) "3.4"
string(1) "2"
}
}
- ["queryString:private"]=>
+ ["queryString":"HttpQueryString":private]=>
&string(49) "c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3&z%5B0%5D=2"
}
array(3) {
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(42) "a=b&c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3"
NULL
string(1) "b"
int(3)
}
object(HttpQueryString)#1 (2) {
- ["queryArray:private"]=>
+ ["queryArray":"HttpQueryString":private]=>
array(3) {
["c"]=>
string(3) "3.4"
string(1) "2"
}
}
- ["queryString:private"]=>
+ ["queryString":"HttpQueryString":private]=>
string(49) "c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3&z%5B0%5D=2"
}
array(3) {
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkext('iconv');
?>
--FILE--
var_dump($qs->get());
echo "Done\n";
--EXPECTF--
-%sTEST
+%aTEST
string(29) "%E4%5B0%5D=%FC&%F6%5Ba%5D=%DF"
string(41) "%C3%A4%5B0%5D=%C3%BC&%C3%B6%5Ba%5D=%C3%9F"
string(29) "%E4%5B0%5D=%FC&%F6%5Ba%5D=%DF"
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "-TEST\n";
-$foo = (object) array("bar" => (object) array("baz" => 1), "\0*\0prop" => "dontshow");
-$foo->bar->baz = 1;
+class test_props {
+ public $bar;
+ public $baz;
+ protected $dont_show;
+ private $dont_show2;
+ function __construct() {
+ $this->bar = (object) array("baz"=>1);
+ $this->dont_show = 'xxx';
+ $this->dont_show2 = 'zzz';
+ }
+}
+$foo = new test_props;
var_dump($q = new HttpQueryString(false, $foo));
$foo->bar->baz = 0;
var_dump($q->mod($foo));
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
object(HttpQueryString)#3 (2) {
- ["queryArray:private"]=>
+ ["queryArray":"HttpQueryString":private]=>
array(1) {
["bar"]=>
array(1) {
int(1)
}
}
- ["queryString:private"]=>
+ ["queryString":"HttpQueryString":private]=>
string(14) "bar%5Bbaz%5D=1"
}
object(HttpQueryString)#4 (2) {
- ["queryArray:private"]=>
+ ["queryArray":"HttpQueryString":private]=>
array(1) {
["bar"]=>
array(1) {
int(0)
}
}
- ["queryString:private"]=>
+ ["queryString":"HttpQueryString":private]=>
string(14) "bar%5Bbaz%5D=0"
}
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
object(HttpRequestDataShare)#1 (4) {
["cookie"]=>
bool(true)
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpRequestPool');
checkurl('www.php.net');
checkurl('dev.iworks.at');
?>
--EXPECTF--
-%sTEST
+%aTEST
http://www.php.net/=200:200
http://dev.iworks.at/ext-http/.print_request.php=200:200
.
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
%d %s %d
%d %s %d
%d %s %d
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpRequest');
checkcls('HttpRequestPool');
?>
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Done
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpRequestPool');
?>
--FILE--
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
HttpRequestPoolException: Exception caused by 2 inner exception(s)
HttpInvalidParamException: Empty or too short HTTP message: ''
HttpRequestException: %souldn't resolve host name; %s (http://_____/)
echo "Done\n";
?>
--EXPECTF--
-%sTEST
-exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %sHttpRequestPool_006.php:%d
+%aTEST
+exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %aHttpRequestPool_006.php:%d
Stack trace:
-#0 %sHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r))
+#0 %aHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r))
#1 [internal function]: r->onProgress(Array)
-#2 %sHttpRequestPool_006.php(%d): HttpRequestPool->send()
+#2 %aHttpRequestPool_006.php(%d): HttpRequestPool->send()
#3 {main}
-exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %sHttpRequestPool_006.php:%d
+exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %aHttpRequestPool_006.php:%d
Stack trace:
-#0 %sHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r))
+#0 %aHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r))
#1 [internal function]: r->onProgress(Array)
-#2 %sHttpRequestPool_006.php(%d): HttpRequestPool->send()
+#2 %aHttpRequestPool_006.php(%d): HttpRequestPool->send()
#3 {main}
array(0) {
}
$c = $this->getResponseCode();
$b = $this->getResponseBody();
- printf("%d %s %d\n", $c, $u, strlen($b));
+ printf("%d %a %d\n", $c, $u, strlen($b));
if ($c == 200 && $this->pool->dir) {
file_put_contents($this->pool->all[$u], $b);
echo "Done\n";
?>
--EXPECTF--
-%sTEST
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
-%d %s %d
+%aTEST
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
+%d %a %d
Elapsed: %fs
Done
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpRequest');
?>
--FILE--
$r2 = null;
?>
--EXPECTF--
-%sTEST
+%aTEST
Array
(
[0] => Array
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpRequest');
checkurl('www.google.com');
checkurl('dev.iworks.at');
echo "Done";
?>
--EXPECTF--
-%sTEST
+%aTEST
Array
(
[effective_url] => http://www.google.com/
[proxyauth_avail] => %d
[os_errno] => %d
[num_connects] => %d
- [ssl_engines] => Array%s
+ [ssl_engines] => Array%a
- [cookies] => Array%s
+ [cookies] => Array%a
[error] =>
)
(
[name] => data.txt
[type] => text/plain
- [tmp_name] => %s
+ [tmp_name] => %a
[error] => 0
[size] => 1010
)
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkurl('arweb.info');
skipif(!http_support(HTTP_SUPPORT_SSLREQUESTS), 'need ssl-request support')
?>
var_dump($o);
?>
--EXPECTF--
-%sTEST
+%aTEST
string(10) "1234567890"
bool(true)
bool(true)
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
First Request
string(%d) "Array
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
object(HttpMessage)#%d (%d) {
["type:protected"]=>
int(2)
float(1.1)
["headers:protected"]=>
array(6) {
- %s
+ %a
}
["parentMessage:protected"]=>
NULL
float(1.1)
["headers:protected"]=>
array(6) {
- %s
+ %a
}
["parentMessage:protected"]=>
NULL
float(1.1)
["headers:protected"]=>
array(6) {
- %s
+ %a
}
["parentMessage:protected"]=>
NULL
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(%d) "PUT /ext-http/.print_put.php5 HTTP/1.1
-User-Agent: PECL::HTTP/%s
+User-Agent: PECL::HTTP/%a
Host: dev.iworks.at
Accept: */*
Content-Type: text/plain
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
-Date: %s
-Server: %s
-X-Powered-By: %s
+Date: %a
+Server: %a
+X-Powered-By: %a
Vary: Accept-Encoding
Content-Length: %d
Content-Type: text/html
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
int(200)
string(%d) "FOOBAR /ext-http/.print_request.php HTTP/1.1
-User-Agent: %s
+User-Agent: %a
Host: dev.iworks.at
Accept: */*
Content-Type: text/plain
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Array
(
[dltotal] => %f
[ultotal] => %f
[ulnow] => %f
)
-%srray
+%array
(
[dltotal] => %f
[dlnow] => %f
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls("HttpRequest");
?>
--FILE--
echo "Done\n";
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
bool(true)
Done
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcgi();
?>
--FILE--
HttpResponse::send();
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: public, must-revalidate, max-age=3600
-Last-Modified: %s, %d %s 20%d %d:%d:%d GMT
-Content-Type: %s
+Last-Modified: %a, %d %a 20%d %d:%d:%d GMT
+Content-Type: %a
Accept-Ranges: bytes
ETag: "3858f62230ac3c915f300c664312c63f"
Content-Length: 6
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcgi();
skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support");
?>
HttpResponse::send();
?>
--EXPECTF--
-X-Powered-By: PHP/%s
-Content-Type: %s
+X-Powered-By: PHP/%a
+Content-Type: %a
Accept-Ranges: bytes
Content-Encoding: gzip
Vary: Accept-Encoding
-%s
+%a
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcgi();
skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support");
?>
HttpResponse::send();
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: public, must-revalidate, max-age=3600
-Last-Modified: %s, %d %s 20%d %d:%d:%d GMT
-Content-Type: %s
+Last-Modified: %a, %d %a 20%d %d:%d:%d GMT
+Content-Type: %a
Accept-Ranges: bytes
-ETag: "%s"
+ETag: "%a"
Content-Encoding: gzip
Vary: Accept-Encoding
-%s
+%a
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support");
?>
--ENV--
HttpResponse::send();
?>
--EXPECTF--
-Status: 304
+Status: 304%s
X-Powered-By: PHP/%s
Cache-Control: public, must-revalidate, max-age=3600
Last-Modified: %s
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
HttpResponse::send();
?>
--EXPECTF--
-Status: 404
+Status: 404%s
X-Powered-By: PHP/%s
Content-Type: text/plain
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-Status: 405
-X-Powered-By: PHP/%s
+Status: 405%s
+X-Powered-By: PHP/%a
Allow: POST
-Content-type: %s
+Content-type: %a
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=example.com
echo "Done";
?>
--EXPECTF--
-%sTEST
-%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [405-ALLOWED] Allow: POST <%s>
+%aTEST
+%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [405-ALLOWED] Allow: POST <%a>
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
a=b
a=b&c%5B0%5D=1
a=b&c%5B0%5D=1&d%5Be%5D=f
echo "Done\n";
?>
--EXPECTF--
-%sTEST
-http://%s/page
-http://%s/with/some/path/
+%aTEST
+http://%a/page
+http://%a/with/some/path/
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
https://www.example.com:9999/replaced?q=1#n
https://www.example.com:9999/replaced?q=1#n
Array
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=www.example.com
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
-http://www.example.com/path/?query#anchor-
-https://www.example.com/path/?query#anchor-
-https://ssl.example.com/path/?query#anchor-
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
http://www.example.com/foo/baz
http://www.example.com/foo/baz
http://mike@www.example.com/foo/baz
var_dump(http_chunked_decode($data));
?>
--EXPECTF--
-%sTEST
+%aTEST
string(12) "abra
cadabra"
var_dump(http_chunked_decode($data));
?>
--EXPECTF--
-%sTEST
+%aTEST
string(12) "abra
cadabra"
var_dump(http_chunked_decode($data));
?>
--EXPECTF--
-%sTEST
-%sWarning%shttp_chunked_decode()%sTruncated message: chunk size 255 exceeds remaining data size 12 at pos 34 of 46 in%s
+%aTEST
+%aWarning%ahttp_chunked_decode()%aTruncated message: chunk size 255 exceeds remaining data size 12 at pos 34 of 46 in%a
string(24) "abra
cadabra
all we got
var_dump(http_chunked_decode($data));
?>
--EXPECTF--
-%sTEST
+%aTEST
string(24) "abra
cadabra
all we got
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
checkcls('HttpRequest');
?>
--FILE--
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(false)
bool(false)
bool(false)
echo http_date(1234567890), "\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Thu, 01 Jan 1970 00:00:01 GMT
Fri, 13 Feb 2009 23:31:30 GMT
echo "$t\n$d\nDone\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
%d
-%s, %d %s %d %d:%d:%d GMT
+%a, %d %a %d %d:%d:%d GMT
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Hi there!
Yo...
bool(true)
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
bool(true)
bool(true)
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
http_send_data("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
Accept-Ranges: bytes
ETag: "4e818847"
Content-Length: 4
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
http_send_data("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
Accept-Ranges: bytes
ETag: "03cfd743661f07975fa2f1220c5194cbaff48451"
Content-Length: 4
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
http_send_data("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
Accept-Ranges: bytes
ETag: "0bee89b07a248e27c83fc3d5951213c1"
Content-Length: 4
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
skipif(!extension_loaded('hash'), 'need ext/hash support');
?>
--FILE--
http_send_data("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
Accept-Ranges: bytes
ETag: "edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb"
Content-Length: 4
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
print("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
ETag: "4e818847"
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
print("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
ETag: "03cfd743661f07975fa2f1220c5194cbaff48451"
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--FILE--
<?php
print("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
ETag: "0bee89b07a248e27c83fc3d5951213c1"
-Content-type: %s
+Content-type: %a
abc
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
skipif(!extension_loaded('hash'), 'need ext/hash support');
?>
--FILE--
print("abc\n");
?>
--EXPECTF--
-X-Powered-By: PHP/%s
+X-Powered-By: PHP/%a
Cache-Control: private, must-revalidate, max-age=0
ETag: "edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb"
-Content-type: %s
+Content-type: %a
abc
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
1: HttpRuntimeException
2: HttpInvalidParamException
3: HttpHeaderException
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
Array
(
[Accept-Charset] => iso-8859-1, *
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_FOO=bar
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
bool(true)
bool(false)
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(2) "de"
string(2) "de"
string(10) "iso-8859-1"
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib");
?>
--ENV--
echo "Done\n";
?>
--EXPECTF--
-%s
+%a
Content-Encoding: gzip
Vary: Accept-Encoding
-%s
+%a
echo http_deflate("TEST\n");
?>
--EXPECTF--
-%sTEST
+%aTEST
echo "Done\n";
?>
--EXPECTF--
-%sTEST
-object(stdClass)%s {
+%aTEST
+object(stdClass)%a {
["cookies"]=>
array(3) {
["name"]=>
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(0) ""
string(0) ""
string(0) ""
));
?>
--EXPECTF--
-%sTEST
+%aTEST
Array
(
[Host] => Array
echo $m->body;
echo "Done\n";
--EXPECTF--
-%sTEST
-<HTML>%sThe document has moved%s</HTML>
+%aTEST
+<HTML>%aThe document has moved%a</HTML>
Done
echo "Done\n";
--EXPECTF--
-%sTEST
+%aTEST
stdClass Object
(
[type] => 2
echo "Done\n";
--EXPECTF--
-%sTEST
+%aTEST
string(2) "OK"
-%s Invalid Content-Range header: bytes 0-1/1 in%s
+%a Invalid Content-Range header: bytes 0-1/1 in%a
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
-object(stdClass)%s {
+%aTEST
+object(stdClass)%a {
["type"]=>
int(2)
["httpVersion"]=>
["body"]=>
string(10) "1234567890"
["parentMessage"]=>
- object(stdClass)%s {
+ object(stdClass)%a {
["type"]=>
int(1)
["httpVersion"]=>
["body"]=>
string(0) ""
["parentMessage"]=>
- object(stdClass)%s {
+ object(stdClass)%a {
["type"]=>
int(2)
["httpVersion"]=>
["body"]=>
string(0) ""
["parentMessage"]=>
- object(stdClass)%s {
+ object(stdClass)%a {
["type"]=>
int(1)
["httpVersion"]=>
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
stdClass Object
(
[type] => 2
echo "Done\n";
?>
--EXPECTF--
-%sTEST
-object(stdClass)%s {
+%aTEST
+object(stdClass)%a {
["params"]=>
array(2) {
[0]=>
}
}
}
-object(stdClass)%s {
+object(stdClass)%a {
["params"]=>
array(2) {
[0]=>
}
}
}
-object(stdClass)%s {
+object(stdClass)%a {
["params"]=>
array(2) {
[0]=>
}
}
}
-object(stdClass)%s {
+object(stdClass)%a {
["params"]=>
array(3) {
[0]=>
foreach (http_persistent_handles_count() as $provider => $idents) {
foreach ((array)$idents as $ident => $counts) {
if (!empty($counts["free"])) {
- printf("%s, %s, %s\n", $provider, $ident, $counts["free"]);
+ printf("%a, %a, %a\n", $provider, $ident, $counts["free"]);
}
}
}
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
No free handles!
One free request handle within GLOBAL: int(1)
Reusing request handle: bool(true)
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
skipif(!http_support(HTTP_SUPPORT_REQUESTS), "need request support");
skipif(function_exists('zend_thread_id'), "need non-ZTS build");
?>
foreach (http_persistent_handles_count() as $provider => $idents) {
foreach ((array)$idents as $ident => $counts) {
if (!empty($counts["free"])) {
- printf("%s, %s, %s\n", $provider, $ident, $counts["free"]);
+ printf("%a, %a, %a\n", $provider, $ident, $counts["free"]);
}
}
}
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
No free handles!
One free request handle within GLOBAL: int(1)
Reusing request handle: bool(true)
foreach (http_persistent_handles_count() as $provider => $idents) {
foreach ((array)$idents as $ident => $counts) {
if (!empty($counts["free"])) {
- printf("%s, %s, %s\n", $provider, $ident, $counts["free"]);
+ printf("%a, %a, %a\n", $provider, $ident, $counts["free"]);
}
}
}
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
No free handles!
One free request handle within GLOBAL: int(1)
Reusing request handle: bool(true)
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=localhost
http_redirect('redirect', array('a' => 1, 'b' => 2));
?>
--EXPECTF--
-Status: 302
-X-Powered-By: PHP/%s
+Status: 302%s
+X-Powered-By: PHP/%a
Location: http://localhost/redirect?a=1&b=2
-Content-type: %s
+Content-type: %a
Redirecting to <a href="http://localhost/redirect?a=1&b=2">http://localhost/redirect?a=1&b=2</a>.
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=example.com
echo "Done";
?>
--EXPECTF--
-%sTEST
-%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%s <%s>
+%aTEST
+%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%a <%a>
Done
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
checkext('session');
?>
--ENV--
http_redirect('redirect', array('a' => 1), true);
?>
--EXPECTF--
-Status: 302
-X-Powered-By: PHP/%s
-Set-Cookie: PHPSESSID=%s; path=/
-Expires: %s
-Cache-Control: %s
-Pragma: %s
-Location: http://localhost/redirect?a=1&PHPSESSID=%s
-Content-type: %s
+Status: 302%s
+X-Powered-By: PHP/%a
+Set-Cookie: PHPSESSID=%a; path=/
+Expires: %a
+Cache-Control: %a
+Pragma: %a
+Location: http://localhost/redirect?a=1&PHPSESSID=%a
+Content-type: %a
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=example.com
echo "Done";
?>
--EXPECTF--
-%sTEST
-%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%s <%s>
+%aTEST
+%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%a <%a>
Done
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=localhost
http_redirect('redirect', null, false, HTTP_REDIRECT_PERM);
?>
--EXPECTF--
-Status: 301
-X-Powered-By: PHP/%s
+Status: 301%s
+X-Powered-By: PHP/%a
Location: http://localhost/redirect
-Content-type: %s
+Content-type: %a
Redirecting to <a href="http://localhost/redirect">http://localhost/redirect</a>.
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_HOST=example.com
echo "Done";
?>
--EXPECTF--
-%sTEST
-%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [301-REDIRECT] Location: http%s <%s>
+%aTEST
+%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [301-REDIRECT] Location: http%a <%a>
Done
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
GET /ext-http/.print_request.php HTTP/1.1
-User-Agent: %s
+User-Agent: %a
Host: dev.iworks.at
Accept: */*
Cookie: name=val%3Due
HTTP/1.1 200 OK
-%s
+%a
Array
(
)
GET /ext-http/.print_request.php HTTP/1.1
-User-Agent: %s
+User-Agent: %a
Host: dev.iworks.at
Accept: */*
Cookie: name=val=ue;
HTTP/1.1 200 OK
-%s
+%a
Array
(
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(%d) "HTTP/1.1 304 Not Modified
-Date: %s
-Server: %s
+Date: %a
+Server: %a
ETag: "26ad3a-5-95eb19c0"
"
Done
\ No newline at end of file
echo "Done\n";
--EXPECTF--
-%sTEST
-object(stdClass)%s {
+%aTEST
+object(stdClass)%a {
["type"]=>
int(2)
["httpVersion"]=>
string(2) "OK"
["headers"]=>
array(8) {
- %s
+ %a
["Vary"]=>
string(15) "Accept-Encoding"
["Content-Length"]=>
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
int(0)
UNKNOWN
int(0)
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
Done
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=-5
http_send_data(str_repeat('123abc', 1000));
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Content-Type: text/plain
Accept-Ranges: bytes
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=5-6
http_send_data(str_repeat('123abc', 1000));
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Content-Type: text/plain
Accept-Ranges: bytes
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=5981-
http_send_data(str_repeat('123abc', 1000));
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Content-Type: text/plain
Accept-Ranges: bytes
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=5990-6000
http_send_data(str_repeat('123abc', 1000));
?>
--EXPECTF--
-Status: 416
-%s
+Status: 416%a
\ No newline at end of file
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-3, 4-5,9-11
http_send_data(str_repeat('123abc', 1000));
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Type: multipart/byteranges; boundary=%d.%d
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-0
http_send_data("abc");
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Content-Type: text/plain
Accept-Ranges: bytes
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-0,-1
http_send_data("01");
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Type: multipart/byteranges; boundary=%d.%d
http_send_file(__FILE__);
?>
--EXPECTF--
-Status: 412
+Status: 412%s
X-Powered-By: %s
Cache-Control: private, must-revalidate, max-age=0
Last-Modified: %s
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-3, 4-5,9-11
http_send_file('data.txt');
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Type: multipart/byteranges; boundary=%d.%d
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-0,-1
http_send_file('data.txt');
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Type: multipart/byteranges; boundary=%d.%d
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-0
http_send_file('data.txt');
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Range: bytes 0-0/1010
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=5-9
http_send_file('data.txt');
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Range: bytes 5-9/1010
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=-9
http_send_file('data.txt');
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Range: bytes 1001-1009/1010
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=1000-
http_send_file('data.txt');
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: PHP/%s
Accept-Ranges: bytes
Content-Range: bytes 1000-1009/1010
<?php
include 'skip.inc';
checkcgi();
-checkmin(5.1);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=-1111
--EXPECTF--
Status: 416
X-Powered-By: PHP/%s
+Accept-Ranges: bytes
Content-type: %s
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-1
http_send_file(__FILE__);
?>
--EXPECTF--
-Status: 206
+Status: 206%s
X-Powered-By: %s
Cache-Control: private, must-revalidate, max-age=0
ETag: "abc"
<?php
include 'skip.inc';
checkcgi();
-checkmin(5);
+checkmin(5.3);
?>
--ENV--
HTTP_RANGE=bytes=0-1
Content-Length: %d
Content-type: text/html
-%s
+%a
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
string(30) "5
Here
2
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
bool(true)
bool(true)
bool(true)
--SKIPIF--
<?php
include 'skip.inc';
-checkmin(5);
+checkmin(5.3);
skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib");
?>
--FILE--
}
?>
--EXPECTF--
-%sTEST
+%aTEST
This is some stream filter fun; we'll see if it bails out or not.
The text should come out at the other end of the stream exactly like written to it.
Go figure!