Commit 26ebfa20 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'bug/blob_escaped_json' into 'master'

Fixed bug with json files content being escaped in api

Fixes #1035
......@@ -22,6 +22,8 @@ class API < Grape::API
format :json
content_type :txt, "text/plain"
helpers APIHelpers
mount Groups
......@@ -167,9 +167,7 @@ def handle_project_member_errors(errors)
blob = Gitlab::Git::Blob.find(repo,, params[:filepath])
not_found! "File" unless blob
env['api.format'] = :txt
content_type blob.mime_type
content_type 'text/plain'
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