took content_type and mime_type from sinatra for better send_file functionality