gitlab-org--gitlab-foss/app
Dmitriy Zaporozhets 28219ea921 Merge branch 'fix-raw-controller-disposition' into 'master'
Remove the filename argument from Content-Disposition header

This MR removes the filename argument from the `Content-Disposition` header to avoid RFC 5987 and RFC 6266 encoding issues. Some browsers (e.g. Internet Explorer) do not properly decode a Unicode string properly, and this can lead to odd filenames in the raw file download. This change allows the browser to determine the filename based on the URL.

For example, if I have a file called `한글한글.pptx` and click to download it with the "Raw" button in the Files section, IE11 will ask:

![image](https://gitlab.com/stanhu/gitlab-ce/uploads/fdb688282c0d4564872deadb44c58b2c/image.png)

If you look at the `Content-Disposition` field, you see this:

![image](https://gitlab.com/stanhu/gitlab-ce/uploads/2b342b83ae1ec61fd31937163ace8ec5/image.png)

Chrome, Firefox, and Safari seem to be able to handle UTF-8 encoded filenames, even though this is not standard.

See: http://greenbytes.de/tech/tc2231/

Closes https://github.com/gitlabhq/gitlabhq/issues/9595

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/1829

I've also submitted a pull request to Rails to support RFC 6266: https://github.com/rails/rails/pull/21461

See merge request !1235
2015-09-02 12:25:28 +00:00
..
assets Prevent anchors from being hidden by header upon a new page load. 2015-08-29 02:05:37 -07:00
controllers Merge branch 'fix-raw-controller-disposition' into 'master' 2015-09-02 12:25:28 +00:00
finders Improve trending projects finder 2015-08-26 22:43:04 +02:00
helpers Remove PreferencesHelper include from GitlabMarkdownHelper 2015-09-01 13:37:05 -04:00
mailers Ignore empty incoming messages. 2015-08-24 10:57:35 -07:00
models Drone CI service 2015-09-02 05:52:16 +03:00
services Don't notify users without access to the project when they are (accidentally) mentioned in a note. 2015-08-26 17:23:22 -07:00
uploaders
views Rename profile settings navigation to "Profile Settings" 2015-09-01 13:35:03 +02:00
workers Expire cache when merge request source branch was removed 2015-08-28 10:23:56 +02:00