gitlab-org--gitlab-foss/spec
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
..
controllers Remove the filename argument from Content-Disposition header to avoid 2015-09-02 00:20:05 -07:00
factories Allow users to send abuse reports 2015-08-06 14:03:27 +02:00
features Make sure the gfm helper passes the required options 2015-08-31 18:09:18 -04:00
finders Add Group#add_* convenience methods 2015-08-07 00:20:02 -04:00
fixtures No HTML-only email please 2015-08-21 16:09:55 -07:00
helpers Remove invalid spec for GitlabMarkdownHelper 2015-08-31 16:22:14 -04:00
javascripts Fix the "Reload with full diff" URL button 2015-07-23 12:53:54 -07:00
lib Merge branch 'rs-cleanup-redcarpet-renderer' into 'master' 2015-09-01 20:13:44 +00:00
mailers Merge branch 'master' into rubocop-for-tests 2015-06-23 10:44:03 +02:00
models Drone CI service 2015-09-02 05:52:16 +03:00
requests/api Drone CI service 2015-09-02 05:52:16 +03:00
routing Revert "Merge branch 'revert-satellites' into 'master' " 2015-08-11 14:33:31 +02: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
support Drone CI service 2015-09-02 05:52:16 +03:00
tasks/gitlab Use a separate backup test directory and nuke its contents 2015-07-24 18:54:06 +02:00
workers Expire cache when merge request source branch was removed 2015-08-28 10:23:56 +02:00
factories.rb Only publish ssh key-type and key 2015-08-04 14:33:18 +02:00
factories_spec.rb
rails_helper.rb Started on the actual rspec 3 upgrade 2015-06-22 12:12:49 +02:00
spec_helper.rb Move coverage-related setup back to spec_helper 2015-07-13 22:41:47 -04:00
teaspoon_env.rb teaspoon install 2015-05-28 18:22:32 -04:00