2
2
Bug #77535 (Invalid callback, h2 server push)
3
3
--EXTENSIONS--
4
4
curl
5
- --XFAIL--
6
- http2.golang.org/serverpush is gone
7
5
--SKIPIF--
8
6
<?php
9
- if (getenv ("SKIP_ONLINE_TESTS " )) {
10
- die ("skip online test " );
11
- }
7
+ include 'skipif-nocaddy.inc ' ;
8
+
12
9
$ curl_version = curl_version ();
13
- if ($ curl_version ['version_number ' ] < 0x073d00 ) {
14
- exit ("skip: test may crash with curl < 7.61 .0 " );
10
+ if ($ curl_version ['version_number ' ] < 0x080100 ) {
11
+ exit ("skip: test may crash with curl < 8.1 .0 " );
15
12
}
16
- die ("skip test is slow due to timeout, and XFAILs anyway " );
17
13
?>
18
14
--FILE--
19
15
<?php
@@ -36,7 +32,7 @@ class MyHttpClient
36
32
curl_setopt ($ this ->curl , CURLOPT_HEADER , false );
37
33
curl_setopt ($ this ->curl , CURLOPT_RETURNTRANSFER , false );
38
34
curl_setopt ($ this ->curl , CURLOPT_FAILONERROR , false );
39
- curl_setopt ($ this ->curl , CURLOPT_URL , 'https://http2.golang.org /serverpush ' );
35
+ curl_setopt ($ this ->curl , CURLOPT_URL , 'https://localhost /serverpush ' );
40
36
curl_setopt ($ this ->curl , CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_2_0 );
41
37
curl_setopt ($ this ->curl , CURLOPT_HEADERFUNCTION , function ($ ch , $ data ) {
42
38
return \strlen ($ data );
0 commit comments