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

Allow non latin-1 filename in FileResponse #792

Merged
merged 1 commit into from
Feb 17, 2020

Conversation

em92
Copy link
Contributor

@em92 em92 commented Jan 13, 2020

Fixes #790

@tomchristie
Copy link
Member

This looks pretty reasonable yup.

Any links to other implementations (eg. Flask) that handle this case, so we can double check what they do? Any particular RFC information that's worth us following here?

@em92
Copy link
Contributor Author

em92 commented Feb 17, 2020

from flask import Flask, send_file
app = Flask(__name__)

@app.route('/')
def hello_world():
    return send_file("你好.txt", as_attachment=True)

https://github.com/pallets/flask/blob/64ba43411fbfb2e435455b0df2453d7809b7c5a8/src/flask/helpers.py#L614-L626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

response headers support custom encoding
2 participants