diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-08-15 17:01:48 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-08-15 17:01:48 +0000 |
commit | 05151f7699ee2adf67ce835413dfdbd80c58a3e5 (patch) | |
tree | 923f09ad89e18fae2101484931dd2c8d10478c66 /lib | |
parent | 97b768508c360d2ae767a559b5037fe464061440 (diff) | |
parent | b7e98620046501144302ff8f9fbf22ff03ef4db7 (diff) | |
download | gitlab-ce-05151f7699ee2adf67ce835413dfdbd80c58a3e5.tar.gz |
Merge branch 'issue_31790' into 'master'
Fix API responses when dealing with txt files
Closes #31790
See merge request !13474
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/files.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb index 450334fee84..e2ac7142bc4 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -1,5 +1,8 @@ module API class Files < Grape::API + # Prevents returning plain/text responses for files with .txt extension + after_validation { content_type "application/json" } + helpers do def commit_params(attrs) { |