Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G gitlab-ce
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedinexedi
  • gitlab-ce
  • Repository
  • gitlab-ce
  • internal
  • senddata
  • contentprocessor
  • contentprocessor_test.go
Find file BlameHistoryPermalink
  • Stan Hu's avatar
    Support encoded Content-Disposition fields · c3cf9c0f
    Stan Hu authored Feb 05, 2019
    https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24919/diffs adds
    support for Rails sending the right `Content-Disposition` header when
    there are non-ASCII filenames (e.g. `テスト.txt`). That example file
    would render the following Content-Disposition:
    
    ```
    attachment; filename="テスト.txt", filename*=UTF-8''%E3%83%86%E3%82%B9%E3%83%88.txt
    ```
    
    Since mime.ParseMediaType appears to strip this header to a canonical
    filename, it's not possible to use this to generate the right
    Content-Disposition. Instead, we can preserve the existing
    Content-Disposition and convert types just by doing a search and replace
    (i.e. change `attachment` to `inline` and vice versa when necessary).
    
    Closes https://gitlab.com/gitlab-org/gitlab-workhorse/issues/207
    c3cf9c0f
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7