diff options
author | Lukas Winkler <git@lw1.at> | 2021-01-01 03:13:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-01 03:13:29 +0300 |
commit | bd58cc881492f5079e8ab3b8265daa72e4db8842 (patch) | |
tree | 1b7fe0d79d2f22b4baf90db028d60f0c62a25e3e /core | |
parent | 05f89156cb4c38ef53e44c522520724664e0f104 (diff) |
always send an "Accept-Encoding" header with HTTP requests (#17009)
* always send an "Accept-Encoding" header with HTTP requests
* revert unrelated change
* only use CURLOPT_ENCODING when not getting a range of bytes (so tests will pass)
Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/Http.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/Http.php b/core/Http.php index 4377ebac7a..793371aa9f 100644 --- a/core/Http.php +++ b/core/Http.php @@ -608,6 +608,11 @@ class Http if ($rangeBytes) { curl_setopt($ch, CURLOPT_RANGE, $rangeBytes); + } else { + // see https://github.com/matomo-org/matomo/pull/17009 for more info + // NOTE: we only do this when CURLOPT_RANGE is not being used, because when using both the + // response is empty. + $curl_options[CURLOPT_ENCODING] = ""; } // Case core:archive command is triggering archiving on https:// and the certificate is not valid |