Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,9 @@ PHP_MINFO_FUNCTION(curl)
{"Largefile", CURL_VERSION_LARGEFILE},
{"libz", CURL_VERSION_LIBZ},
{"NTLM", CURL_VERSION_NTLM},
#if LIBCURL_VERSION_NUM >= 0x071306 /* 7.19.6 */
{"TrackMemory", CURL_VERSION_CURLDEBUG},
#endif
#if LIBCURL_VERSION_NUM >= 0x071600 /* 7.22.0 */
{"NTLMWB", CURL_VERSION_NTLM_WB},
#endif
Expand Down Expand Up @@ -577,6 +580,9 @@ PHP_MINFO_FUNCTION(curl)
#endif
#if LIBCURL_VERSION_NUM >= 0x073900 /* 7.57.0 */
{"BROTLI", CURL_VERSION_BROTLI},
#endif
#if LIBCURL_VERSION_NUM >= 0x074001 /* 7.64.1 */
{"Alt-Svc", CURL_VERSION_ALTSVC},
#endif
{NULL, 0}
};
Expand Down
55 changes: 55 additions & 0 deletions ext/curl/tests/check_features_unix.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
--TEST--
Check libcurl features list
--SKIPIF--
<?php

include 'skipif.inc';

if (substr(PHP_OS, 0, 3) === 'WIN') {
exit('skip: test doesn\'t work with Windows');
}

$version = curl_version();

if ($version['version_number'] < 0x071306) {
exit('skip: test works only with curl >= 7.19.6');
}

?>
--FILE--
<?php
ob_start();
phpinfo();
$s = ob_get_contents();
ob_end_clean();
preg_match('/curl\n\n(.+)\n\n/siU', $s, $m);

echo $m[1], "\n";

?>
--EXPECTF--
cURL support => enabled
cURL Information => %s
Age => %d
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => Yes
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
TrackMemory => No
NTLMWB => Yes
SPNEGO => No
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp
Host => %s
SSL Version => GnuTLS/%s
ZLib Version => %s
63 changes: 63 additions & 0 deletions ext/curl/tests/check_features_win.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
--TEST--
Check libcurl features list
--SKIPIF--
<?php

include 'skipif.inc';

if (substr(PHP_OS, 0, 3) !== 'WIN') {
exit('skip: test only works with Windows');
}

$version = curl_version();

if ($version['version_number'] < 0x071306) {
exit('skip: test works only with curl >= 7.19.6');
}

?>
--FILE--
<?php
ob_start();
phpinfo();
$s = ob_get_contents();
ob_end_clean();
preg_match('/curl\n\n(.+)\n\n/siU', $s, $m);

echo $m[1], "\n";

?>
--EXPECTF--
cURL support => enabled
cURL Information => %s
Age => %d
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
TrackMemory => No
NTLMWB => No
SPNEGO => Yes
SSL => Yes
SSPI => Yes
TLS-SRP => No
HTTP2 => Yes
GSSAPI => No
KERBEROS5 => Yes
UNIX_SOCKETS => No
PSL => No
HTTPS_PROXY => Yes
MULTI_SSL => %s
BROTLI => %s
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => %s-pc-win32
SSL Version => OpenSSL/%s
ZLib Version => %s
libSSH Version => libssh2/%s
1 change: 1 addition & 0 deletions ext/curl/tests/check_win_config.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
TrackMemory => No
NTLMWB => No
SPNEGO => Yes
SSL => Yes
Expand Down