mirror of
https://github.com/nextcloud/server.git
synced 2026-07-16 13:23:11 -04:00
- Prefer HTTP/2 by setting RequestOptions::VERSION => "2.0" so clients
that respect PSR-7 request version will prefer HTTP/2.
- Add a curl hint (CURLOPT_HTTP_VERSION) to prefer HTTP/2 via ALPN
(CURL_HTTP_VERSION_2TLS or CURL_HTTP_VERSION_2_0 fallback) while allowing
automatic fallback to HTTP/1.1.
- Advertise Brotli ("br") in Accept-Encoding when the php-brotli extension
is available (detected via function_exists('brotli_uncompress')), otherwise
fall back to gzip.
Notes:
- The PSR-7 request version is used as a hint for HTTP client libraries;
setting the version to "2.0" signals a preference for HTTP/2 at the request
abstraction level.
- The curl option is defensive: it prefers HTTP/2 where libcurl supports it
(via ALPN), but will not break on older libcurl/builds (uses defined()).
Compatibility:
- Fully backwards compatible: if the php-brotli extension is not present,
no Brotli usage will occur and behaviour remains equivalent to previous
(gzip).
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
|
||
|---|---|---|
| .. | ||
| composer | ||
| l10n | ||
| private | ||
| public | ||
| unstable | ||
| base.php | ||
| versioncheck.php | ||