diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-05-20 11:08:27 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-05-20 13:37:28 +0200 |
commit | 8bcd1c31da7a02e78435aa49508ed3787b11867d (patch) | |
tree | 1eaeb0245783501e618d5b4b5c2ac6d9d3bf98fc /lib/private/Http/Client/Client.php | |
parent | 526905cfc28f701c828c439fba40d9745d3a3ba3 (diff) | |
download | nextcloud-server-8bcd1c31da7a02e78435aa49508ed3787b11867d.tar.gz nextcloud-server-8bcd1c31da7a02e78435aa49508ed3787b11867d.zip |
Allow gzip encoded requests by default
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Http/Client/Client.php')
-rw-r--r-- | lib/private/Http/Client/Client.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index d19f1124a23..af43df6365f 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -89,6 +89,10 @@ class Client implements IClient { $options[RequestOptions::HEADERS]['User-Agent'] = 'Nextcloud Server Crawler'; } + if (!isset($options[RequestOptions::HEADERS]['Accept-Encoding'])) { + $options[RequestOptions::HEADERS]['Accept-Encoding'] = 'gzip'; + } + return $options; } |