Merge branch 'bug/blob_escaped_json' into 'master'

Fixed bug with json files content being escaped in api

Fixes #1035
This commit is contained in:
Dmitriy Zaporozhets
2014-02-18 10:46:50 +00:00
2 changed files with 3 additions and 3 deletions
+2
View File
@@ -22,6 +22,8 @@ module API
end
format :json
content_type :txt, "text/plain"
helpers APIHelpers
mount Groups
+1 -3
View File
@@ -167,9 +167,7 @@ module API
blob = Gitlab::Git::Blob.find(repo, commit.id, params[:filepath])
not_found! "File" unless blob
env['api.format'] = :txt
content_type blob.mime_type
content_type 'text/plain'
present blob.data
end