This commit is contained in:
syuilo 2019-06-18 14:04:41 +09:00
parent 16ae0e036d
commit e4ff9adbcb

View file

@ -25,6 +25,7 @@ export async function downloadUrl(url: string, path: string) {
rej(error);
});
// 多バイト文字が含まれてそうだったらリクエスト前にURIエンコードする
const requestUrl = new URL(url).pathname.match(/[^\u0021-\u00ff]/) ? encodeURI(url) : url;
const req = request({