Guess the mime_type

It's no longer required to ask the browser to download the file directly. We
can now let the broswer decide what to do with the content.
Some artifacts will be directly visible (text, images, ..) the others will be
downloaded.
Fix pep8 error