about summary refs log tree commit diff
path: root/app/lib/request.rb
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-05-09 23:59:39 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-05-09 16:59:39 +0200
commitedf882320a12b2c0cfa7fc0fb7eafaa39021cb0f (patch)
tree2380d8cbff4c697f6503a43828540b0abbb1e56c /app/lib/request.rb
parent16fee0335f2b10b0ce54f71965d2f2acc0e24942 (diff)
Support gzip encoding on Request (#7425)
Diffstat (limited to 'app/lib/request.rb')
-rw-r--r--app/lib/request.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/request.rb b/app/lib/request.rb
index 00f94dacf..fc7d398e0 100644
--- a/app/lib/request.rb
+++ b/app/lib/request.rb
@@ -51,7 +51,7 @@ class Request
   end
 
   def headers
-    (@account ? @headers.merge('Signature' => signature) : @headers).without(REQUEST_TARGET)
+    (@account ? @headers.merge('Signature' => signature) : @headers).reverse_merge('Accept-Encoding' => 'gzip').without(REQUEST_TARGET)
   end
 
   private
@@ -100,7 +100,7 @@ class Request
   end
 
   def http_client
-    @http_client ||= HTTP.timeout(:per_operation, timeout).follow(max_hops: 2)
+    @http_client ||= HTTP.use(:auto_inflate).timeout(:per_operation, timeout).follow(max_hops: 2)
   end
 
   def use_proxy?