-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Send download encodes reserved chars #5928
Conversation
mcrumm
commented
Sep 6, 2024
- Closes Error when using send_download/3 with a filename that contains spaces and commas #5926
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -537,6 +537,17 @@ defmodule Phoenix.Controller.ControllerTest do | |||
"world" | |||
end | |||
|
|||
test "issue #5926, sends file for download for filename with unreserved characters" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we usually include the issue # in the test name.
💚 💙 💜 💛 ❤️ |
It looks like this still hasn't been released. Is there anything blocking this from being released? |
@ftes there are a lot of changes on main that are waiting for 1.8. We're planning to focus on the missing pieces in the next couple of weeks. For now, we haven't planned to do another 1.7 release, but maybe we should? @josevalim |
I didn't backport this on purpose to v1.7 because people could be relying on the old behaviour for some reason, even if buggy. So you can either prune it yourself, use main, or wait until v1.8 is out :) |
Thanks for the update! Workaround in user land: filename = URI.encode(filename, &URI.char_unreserved?/1)
send_download(conn, {:binary, body}, filename: filename, encode: false) |