BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b2a634c3
Commit
b2a634c3
authored
Feb 01, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid trailing 'charset=' garbage
parent
2679ec40
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
avatars_controller.rb
app/controllers/projects/avatars_controller.rb
+2
-1
raw_controller.rb
app/controllers/projects/raw_controller.rb
+2
-1
No files found.
app/controllers/projects/avatars_controller.rb
View file @
b2a634c3
...
@@ -8,7 +8,8 @@ class Projects::AvatarsController < Projects::ApplicationController
...
@@ -8,7 +8,8 @@ class Projects::AvatarsController < Projects::ApplicationController
headers
[
'X-Content-Type-Options'
]
=
'nosniff'
headers
[
'X-Content-Type-Options'
]
=
'nosniff'
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
repository
,
@blob
))
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
repository
,
@blob
))
headers
[
'Content-Disposition'
]
=
'inline'
headers
[
'Content-Disposition'
]
=
'inline'
render
nothing:
true
,
content_type:
@blob
.
content_type
headers
[
'Content-Type'
]
=
@blob
.
content_type
head
:ok
# 'render nothing: true' messes up the Content-Type
else
else
render_404
render_404
end
end
...
...
app/controllers/projects/raw_controller.rb
View file @
b2a634c3
...
@@ -17,7 +17,8 @@ class Projects::RawController < Projects::ApplicationController
...
@@ -17,7 +17,8 @@ class Projects::RawController < Projects::ApplicationController
else
else
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
@repository
,
@blob
))
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
@repository
,
@blob
))
headers
[
'Content-Disposition'
]
=
'inline'
headers
[
'Content-Disposition'
]
=
'inline'
render
nothing:
true
,
content_type:
get_blob_type
headers
[
'Content-Type'
]
=
get_blob_type
head
:ok
# 'render nothing: true' messes up the Content-Type
end
end
else
else
render_404
render_404
...
...
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