fix text/ MIME charset workaround

このコミットが含まれているのは:
Martin Herkt 2016-11-01 21:53:10 +01:00
コミット 200d0a369f
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: C24B9CD04DC6AE7F
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -143,7 +143,7 @@ def store_file(f, addr):
if mime in app.config["FHOST_MIME_BLACKLIST"] or guessmime in app.config["FHOST_MIME_BLACKLIST"]:
abort(415)
if mime.startswith("text/") and not "charset" in f.mime:
if mime.startswith("text/") and not "charset" in f.content_type:
mime += "; charset=utf-8"
ext = os.path.splitext(f.filename)[1]