Commit 26ebfa20f082214f3dbd5d5ca49957d8cc83d234
Exists in
spb-stable
and in
3 other branches
Merge branch 'bug/blob_escaped_json' into 'master'
Fixed bug with json files content being escaped in api Fixes #1035
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
lib/api/api.rb
lib/api/repositories.rb
@@ -167,9 +167,7 @@ module API | @@ -167,9 +167,7 @@ module API | ||
167 | blob = Gitlab::Git::Blob.find(repo, commit.id, params[:filepath]) | 167 | blob = Gitlab::Git::Blob.find(repo, commit.id, params[:filepath]) |
168 | not_found! "File" unless blob | 168 | not_found! "File" unless blob |
169 | 169 | ||
170 | - env['api.format'] = :txt | ||
171 | - | ||
172 | - content_type blob.mime_type | 170 | + content_type 'text/plain' |
173 | present blob.data | 171 | present blob.data |
174 | end | 172 | end |
175 | 173 |