hack to detect and use the proper mimetype from https://github.com/cgg5207/httmultiparty/commit/6dee112283be64399704b2f7ae92fba7fc33156b