[php-src] Issue #21599: Windows' PHP 8.5 still doesn't handle br-encoded response correctly

[email protected] (yoozor)
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/21599
Author: yoozor

### Description

## This DOES NOT happen on Linux (linux+php) but on Windows for many years. When are you going to support brotli-encoded response on Windows??

The following code:

```php
<?php
$url = 'https://ftp.mozilla.org/';

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_VERBOSE => true,
    CURLOPT_TIMEOUT => 15,
    CURLOPT_HTTPHEADER => [
        'User-Agent: Mozilla/5.0 (Android; K) Chrome/144.0',
    ],
    CURLOPT_ENCODING => 'gzip, deflate, br',
]);

$response = curl_exec($ch);

if ($response === false) {
    echo "cURL error: " . curl_error($ch);
} else {
    echo $response;
}

```

Resulted in this output:
```
....
* Request completely sent off
< HTTP/2 200 
....
< content-encoding: br
....
bool(false)
```

But I expected this output instead:
```
....
* Request completely sent off
< HTTP/2 200 
....
< content-encoding: br
....
<!DOCTYPE html>
<html>
....
```


### PHP Version

```plain
PHP 8.5.4 (cli)
```

### Operating System

Windows
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.