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

MIME::Types usage bug? #1039

Closed
ioquatix opened this issue Oct 9, 2016 · 4 comments
Closed

MIME::Types usage bug? #1039

ioquatix opened this issue Oct 9, 2016 · 4 comments

Comments

@ioquatix
Copy link

ioquatix commented Oct 9, 2016

# Have to do this because MIME::Types is not Ruby 1.9 safe yet
if RUBY_VERSION >= '1.9'
filename = filename.encode(Encoding::UTF_8) if filename.respond_to?(:encode)
end

Seems like this shouldn't be necessary any more?

@ioquatix
Copy link
Author

ioquatix commented Oct 9, 2016

We are also discussing whether memory usage can be improved. 70% of memory required by a default setup of mail is simply by the mime-types gem. mime-types/ruby-mime-types#123

It seems a pity that this gem is well engineered to be memory efficient and yet it's not possible to use it without a huge overhead which for 99% of cases probably isn't even relevant.

@jeremy
Copy link
Collaborator

jeremy commented Oct 10, 2016

Seems like it, but we support a wide range of mime-types versions. Can we limit it to specific versions only?

@ioquatix
Copy link
Author

Regarding the ruby code, have we checked that this is still a problem? What version of mime-types suffered this problem? I just saw this code when reviewing how mail uses mime-types. But I don't really know more than that.

@jeremy
Copy link
Collaborator

jeremy commented May 17, 2017

Switched to mini_mime #1059, #1060

@jeremy jeremy closed this as completed May 17, 2017
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