Closed llaville closed 3 years ago
http\Client\Curl\Versions\BROTLI
lists the version libcurl
was built with, if any.
Try checking ldd /usr/lib/libcurl.so
if libcurl was linked against libbrotli.
Apparently, I missed to add libbrotli to the phpinfo
output, though! (but this only affects http\Encoding\Stream
support)
As http\Client\Curl\Versions\BROTLI
was introduced since release 4.1.0 only, the only way to get libbrotli version (from PHP script) is to parse http\Client\Curl\VERSIONS
But in my case, its impossible because info is missing
Constant [ string http\Client\Curl\VERSIONS ] { libcurl/7.64.0 OpenSSL/1.1.1d zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
it will really help if available !
Hi! This info is what libcurl literally tells us. If it's not there, then libcurl itself was not built with libbrotli support.
HTH
HTH Not really, even if I understand !
As I've a pecl_http version that support BROTLI compression format (https://github.com/google/brotli)
=> Constant [ int http\Client\Curl\Features\BROTLI ] { 8388608 }
See checks at https://github.com/m6w6/ext-http/blob/master/autoconf/pecl/libbrotli.m4#L10-L16
And version of libbrotli is provided by libbrotlicommon
that I have (see pkg-config output)
devilbox@php-8.0.5 in /shared/httpd $ pkg-config --print-provides libbrotlicommon
libbrotlicommon = 1.0.7
Defined in source code; See https://github.com/google/brotli/blob/v1.0.7/c/common/version.h#L17
Is it a reason why we could not see libbrotli displayed both in pecl_http 3.2.x and 4.x versions
Sorry for the confusion; http\Client\Curl\FEATURES
has to be tested to include http\Client\Curl\Features\BROTLI
; see https://mdref.m6w6.name/http/Client/Curl#FEATURES
Example:
if (http\Client\Curl\FEATURES & http\Client\Curl\Features\BROTLI) {
...
}
Hello,
I've rebuild version 3.2.4 (under PHP 7.3 and 7.4) and 4.1.0 (under PHP 8.0) and got the same results.
I expect to see libbrotli version available on
http\Client\Curl\Versions\BROTLI
but see nothing while I've lib available and used during pecl installation.And got with following CLI command
php --re http
this output (partial here) :Did I missed something ?