Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't url escape filenames on download #2761

Closed
wants to merge 1 commit into from

Conversation

gnestor
Copy link
Contributor

@gnestor gnestor commented Aug 15, 2017

Closes #2742

@takluyver
Copy link
Member

This looks fine to me, but I'd like @minrk to have a quick look too. I notice you've also marked it for 5.2, so we should release 5.1 before merging it.

@gnestor
Copy link
Contributor Author

gnestor commented Aug 15, 2017

We can fit this in 5.1 as long as we're confident that this won't break anything else! 😮

@gnestor gnestor requested a review from minrk August 15, 2017 16:05
@minrk
Copy link
Member

minrk commented Aug 16, 2017

This solves a problem for spaces in ascii names but reintroduces a problem for non-ascii names.

Test with a filename like 'üni spåce™' to be sure it's working.

@minrk
Copy link
Member

minrk commented Aug 16, 2017

Some diagnoses:

  1. the + was introduced by using the wrong escape function (tornado.escape.url_escape, which is for URL query parameters by default, not url components)
  2. Putting a name in quotes means it shouldn't be escaped, but it also has to be Latin-1 if you do that.
  3. RFC 6266 explains how to specify filename encodings properly (url escapes were the right thing to do, we just did them wrong)

#2767 should implement filename encoding correctly. I've tested it on Safari, Chrome, and Firefox.

@takluyver takluyver modified the milestones: Reference, 5.2 Aug 18, 2017
@takluyver
Copy link
Member

Closing in favour of #2767.

@takluyver takluyver closed this Aug 18, 2017
@gnestor gnestor deleted the no-url-escape branch August 18, 2017 17:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download as HTML puts "+" symbols instead of spaces in filename
3 participants