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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8a6a8535
Commit
8a6a8535
authored
Mar 30, 2022
by
Stan Hu
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'morefice/fix-artifacts-content-type' into 'master'"
This reverts merge request !83515
parent
0bd90233
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
25 deletions
+3
-25
app/helpers/workhorse_helper.rb
app/helpers/workhorse_helper.rb
+0
-2
lib/api/helpers.rb
lib/api/helpers.rb
+0
-1
lib/gitlab/workhorse.rb
lib/gitlab/workhorse.rb
+0
-7
spec/controllers/projects/artifacts_controller_spec.rb
spec/controllers/projects/artifacts_controller_spec.rb
+0
-1
spec/lib/gitlab/workhorse_spec.rb
spec/lib/gitlab/workhorse_spec.rb
+0
-8
spec/requests/api/ci/job_artifacts_spec.rb
spec/requests/api/ci/job_artifacts_spec.rb
+3
-6
No files found.
app/helpers/workhorse_helper.rb
View file @
8a6a8535
...
...
@@ -38,8 +38,6 @@ module WorkhorseHelper
# Send an entry from artifacts through Workhorse
def
send_artifacts_entry
(
file
,
entry
)
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_artifacts_entry
(
file
,
entry
))
headers
.
store
(
*
Gitlab
::
Workhorse
.
detect_content_type
)
head
:ok
end
...
...
lib/api/helpers.rb
View file @
8a6a8535
...
...
@@ -707,7 +707,6 @@ module API
def
send_artifacts_entry
(
file
,
entry
)
header
(
*
Gitlab
::
Workhorse
.
send_artifacts_entry
(
file
,
entry
))
header
(
*
Gitlab
::
Workhorse
.
detect_content_type
)
body
''
end
...
...
lib/gitlab/workhorse.rb
View file @
8a6a8535
...
...
@@ -226,13 +226,6 @@ module Gitlab
end
end
def
detect_content_type
[
Gitlab
::
Workhorse
::
DETECT_HEADER
,
'true'
]
end
protected
# This is the outermost encoding of a senddata: header. It is safe for
...
...
spec/controllers/projects/artifacts_controller_spec.rb
View file @
8a6a8535
...
...
@@ -323,7 +323,6 @@ RSpec.describe Projects::ArtifactsController do
subject
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
.
headers
[
'Gitlab-Workhorse-Detect-Content-Type'
]).
to
eq
(
'true'
)
expect
(
send_data
).
to
start_with
(
'artifacts-entry:'
)
expect
(
params
.
keys
).
to
eq
(
%w(Archive Entry)
)
...
...
spec/lib/gitlab/workhorse_spec.rb
View file @
8a6a8535
...
...
@@ -448,14 +448,6 @@ RSpec.describe Gitlab::Workhorse do
end
end
describe
'.detect_content_type'
do
subject
{
described_class
.
detect_content_type
}
it
'returns array setting detect content type in workhorse'
do
expect
(
subject
).
to
eq
(
%w[Gitlab-Workhorse-Detect-Content-Type true]
)
end
end
describe
'.send_git_blob'
do
include
FakeBlobHelpers
...
...
spec/requests/api/ci/job_artifacts_spec.rb
View file @
8a6a8535
...
...
@@ -556,8 +556,7 @@ RSpec.describe API::Ci::JobArtifacts do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
.
headers
.
to_h
)
.
to
include
(
'Content-Type'
=>
'application/json'
,
'Gitlab-Workhorse-Send-Data'
=>
/artifacts-entry/
,
'Gitlab-Workhorse-Detect-Content-Type'
=>
'true'
)
'Gitlab-Workhorse-Send-Data'
=>
/artifacts-entry/
)
end
end
...
...
@@ -627,8 +626,7 @@ RSpec.describe API::Ci::JobArtifacts do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
.
headers
.
to_h
)
.
to
include
(
'Content-Type'
=>
'application/json'
,
'Gitlab-Workhorse-Send-Data'
=>
/artifacts-entry/
,
'Gitlab-Workhorse-Detect-Content-Type'
=>
'true'
)
'Gitlab-Workhorse-Send-Data'
=>
/artifacts-entry/
)
expect
(
response
.
parsed_body
).
to
be_empty
end
end
...
...
@@ -646,8 +644,7 @@ RSpec.describe API::Ci::JobArtifacts do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
.
headers
.
to_h
)
.
to
include
(
'Content-Type'
=>
'application/json'
,
'Gitlab-Workhorse-Send-Data'
=>
/artifacts-entry/
,
'Gitlab-Workhorse-Detect-Content-Type'
=>
'true'
)
'Gitlab-Workhorse-Send-Data'
=>
/artifacts-entry/
)
end
end
...
...
Alain Takoudjou
@alain.takoudjou
mentioned in commit
90a29656
·
Apr 03, 2024
mentioned in commit
90a29656
mentioned in commit 90a29656113974a9258b2f33a82550218622d735
Toggle commit list
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