Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
bf1cb9b8
Commit
bf1cb9b8
authored
Mar 29, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
11be679c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
2 deletions
+20
-2
changelogs/unreleased/sh-disable-archive-rate-throttle-default.yml
...s/unreleased/sh-disable-archive-rate-throttle-default.yml
+5
-0
changelogs/unreleased/wc-httio-accept-encoding.yml
changelogs/unreleased/wc-httio-accept-encoding.yml
+5
-0
lib/gitlab/http_io.rb
lib/gitlab/http_io.rb
+1
-1
lib/gitlab/rate_limit_helpers.rb
lib/gitlab/rate_limit_helpers.rb
+1
-1
spec/lib/gitlab/http_io_spec.rb
spec/lib/gitlab/http_io_spec.rb
+8
-0
No files found.
changelogs/unreleased/sh-disable-archive-rate-throttle-default.yml
0 → 100644
View file @
bf1cb9b8
---
title
:
Disable archive rate limit by default
merge_request
:
28264
author
:
type
:
fixed
changelogs/unreleased/wc-httio-accept-encoding.yml
0 → 100644
View file @
bf1cb9b8
---
title
:
Don't send 'accept-encoding' in HttpIO requests
merge_request
:
28239
author
:
type
:
fixed
lib/gitlab/http_io.rb
View file @
bf1cb9b8
...
...
@@ -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
...
...
lib/gitlab/rate_limit_helpers.rb
View file @
bf1cb9b8
...
...
@@ -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
...
...
spec/lib/gitlab/http_io_spec.rb
View file @
bf1cb9b8
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment