Commit b2a634c3 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Avoid trailing 'charset=' garbage

parent 2679ec40
......@@ -8,7 +8,8 @@ class Projects::AvatarsController < Projects::ApplicationController
headers['X-Content-Type-Options'] = 'nosniff'
headers.store(*Gitlab::Workhorse.send_git_blob(repository, @blob))
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
render_404
end
......
......@@ -17,7 +17,8 @@ class Projects::RawController < Projects::ApplicationController
else
headers.store(*Gitlab::Workhorse.send_git_blob(@repository, @blob))
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
else
render_404
......
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