Commit bf1cb9b8 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 11be679c
---
title: Disable archive rate limit by default
merge_request: 28264
author:
type: fixed
---
title: Don't send 'accept-encoding' in HttpIO requests
merge_request: 28239
author:
type: fixed
......@@ -176,7 +176,7 @@ module Gitlab
end
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)
end
end
......
......@@ -7,7 +7,7 @@ module Gitlab
ARCHIVE_RATE_THROTTLE_KEY = :project_repositories_archive
def archive_rate_limit_reached?(user, project)
return false unless Feature.enabled?(:archive_rate_limit, default_enabled: true)
return false unless Feature.enabled?(:archive_rate_limit)
key = ARCHIVE_RATE_THROTTLE_KEY
......
......@@ -319,4 +319,12 @@ describe Gitlab::HttpIO do
it { is_expected.to be_truthy }
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
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