28219ea921
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 |
||
---|---|---|
.. | ||
controllers | ||
factories | ||
features | ||
finders | ||
fixtures | ||
helpers | ||
javascripts | ||
lib | ||
mailers | ||
models | ||
requests/api | ||
routing | ||
services | ||
support | ||
tasks/gitlab | ||
workers | ||
factories.rb | ||
factories_spec.rb | ||
rails_helper.rb | ||
spec_helper.rb | ||
teaspoon_env.rb |