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

Ability to disable mimetype-guessing for send_file #285

Closed
untitaker opened this issue Oct 4, 2015 · 1 comment
Closed

Ability to disable mimetype-guessing for send_file #285

untitaker opened this issue Oct 4, 2015 · 1 comment

Comments

@untitaker
Copy link

The file has no file extension, but I know the mimetype.

Some ideas:

  • Use set_header_fallback inside send_file so I can set the header beforehand
  • Implement Responder for file objects, change send_file to build the mimetype guessing on top of that.
@Ryman
Copy link
Member

Ryman commented Oct 8, 2015

@untitaker The first suggestion sounds worth doing regardless, would you like to PR that change?

I've considered implementing Responder for File/Path before, but I can't remember what was iffy about that, it might be worth investigating again :)

Ryman added a commit to Ryman/nickel.rs that referenced this issue Oct 30, 2015
homu added a commit that referenced this issue Oct 30, 2015
fix(send_file): don't overwrite the ContentType header if it exists

Fixes #285.
@homu homu closed this as completed in #290 Oct 30, 2015
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

No branches or pull requests

2 participants