Commit 8e8c6a26 authored by Stan Hu's avatar Stan Hu

Merge branch 'wc-httio-accept-encoding' into 'master'

Don't send 'accept-encoding' header in HttpIO

Closes #212609

See merge request gitlab-org/gitlab!28239
parents dbdb8627 7647af6f
---
title: Don't send 'accept-encoding' in HttpIO requests
merge_request: 28239
author:
type: fixed
...@@ -176,7 +176,7 @@ module Gitlab ...@@ -176,7 +176,7 @@ module Gitlab
end end
def request def request
Net::HTTP::Get.new(uri).tap do |request| Net::HTTP::Get.new(uri, { 'accept-encoding' => nil }).tap do |request|
request.set_range(chunk_start, BUFFER_SIZE) request.set_range(chunk_start, BUFFER_SIZE)
end end
end end
......
...@@ -319,4 +319,12 @@ describe Gitlab::HttpIO do ...@@ -319,4 +319,12 @@ describe Gitlab::HttpIO do
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
end end
describe '#send' do
subject(:send) { http_io.send(:request) }
it 'does not set the "accept-encoding" header' do
expect(send['accept-encoding']).to be_nil
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment