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
0a13f5f8
Commit
0a13f5f8
authored
Apr 19, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Rails-way to send file by X-Sendfile
parent
d2dc139d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+2
-5
No files found.
app/controllers/projects/builds_controller.rb
View file @
0a13f5f8
...
@@ -63,14 +63,11 @@ class Projects::BuildsController < Projects::ApplicationController
...
@@ -63,14 +63,11 @@ class Projects::BuildsController < Projects::ApplicationController
end
end
def
raw
def
raw
response
.
headers
[
'Content-Type'
]
=
'text/plain; charset=utf-8'
if
@build
.
has_trace?
if
@build
.
has_trace?
response
.
headers
[
'X-Sendfile'
]
=
@build
.
path_to_trace
send_file
@build
.
path_to_trace
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
else
else
re
sponse
.
status
=
404
re
nder_
404
end
end
render
nothing:
true
end
end
private
private
...
...
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