Skip to content

add image content-type header

Matthias Käppler requested to merge github/fork/darkrasid/master into master

Created by: darkrasid

When I use image in Markdown, I find a bug. If I link image in MD file from gitlab raw data, it would not show on IE. (eg. https://gitlab.com/user_id/repo_name/raw/master/image.png)

issue : https://gitlab.com/gitlab-org/gitlab-ce/issues/2376

It is because of content-type of headers. If the blob is not text, the content-type is always application/octet-stream. And IE cannot resolve it to image so it will be cracked. (I test it IE 10, 11) So I add code to change content-type if blob type is image.

modified:   app/controllers/projects/raw_controller.rb

Merge request reports

Loading